Class AheadOfTimeBlobDownloadingFlatFileStore
- java.lang.Object
-
- org.apache.jackrabbit.oak.index.indexer.document.flatfile.AheadOfTimeBlobDownloadingFlatFileStore
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<NodeStateEntry>
,IndexStore
public class AheadOfTimeBlobDownloadingFlatFileStore extends Object implements IndexStore
-
-
Field Summary
Fields Modifier and Type Field Description static String
BLOB_PREFETCH_BINARY_NODES_SUFFIX
static String
BLOB_PREFETCH_DOWNLOAD_AHEAD_WINDOW_MB
static String
BLOB_PREFETCH_DOWNLOAD_AHEAD_WINDOW_SIZE
static String
BLOB_PREFETCH_DOWNLOAD_THREADS
static String
BLOB_PREFETCH_ENABLE_FOR_INDEXES_PREFIXES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static List<org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition>
filterEnabledIndexes(List<String> enabledIndexesPrefixes, List<org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition> indexDefinitions)
Returns the indexes for which AOT blob downloading is enabled, that is, for which the index name starts with any of the prefixes in the enabledForIndexes list.long
getEntryCount()
String
getIndexStoreType()
String
getStorePath()
static boolean
isEnabledForAnyOfIndexes(List<String> enableIndexesPrefix, List<String> indexPaths)
Whether blob downloading is needed for any the given indexes.boolean
isIncremental()
@NotNull Iterator<NodeStateEntry>
iterator()
void
setEntryCount(long entryCount)
static List<String>
splitAndTrim(String str)
static AheadOfTimeBlobDownloadingFlatFileStore
wrap(FlatFileStore ffs, List<org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition> indexDefinitions, GarbageCollectableBlobStore blobStore)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
BLOB_PREFETCH_ENABLE_FOR_INDEXES_PREFIXES
public static final String BLOB_PREFETCH_ENABLE_FOR_INDEXES_PREFIXES
- See Also:
- Constant Field Values
-
BLOB_PREFETCH_BINARY_NODES_SUFFIX
public static final String BLOB_PREFETCH_BINARY_NODES_SUFFIX
- See Also:
- Constant Field Values
-
BLOB_PREFETCH_DOWNLOAD_THREADS
public static final String BLOB_PREFETCH_DOWNLOAD_THREADS
- See Also:
- Constant Field Values
-
BLOB_PREFETCH_DOWNLOAD_AHEAD_WINDOW_MB
public static final String BLOB_PREFETCH_DOWNLOAD_AHEAD_WINDOW_MB
- See Also:
- Constant Field Values
-
BLOB_PREFETCH_DOWNLOAD_AHEAD_WINDOW_SIZE
public static final String BLOB_PREFETCH_DOWNLOAD_AHEAD_WINDOW_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
wrap
public static AheadOfTimeBlobDownloadingFlatFileStore wrap(FlatFileStore ffs, List<org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition> indexDefinitions, GarbageCollectableBlobStore blobStore)
-
filterEnabledIndexes
public static List<org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition> filterEnabledIndexes(List<String> enabledIndexesPrefixes, List<org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition> indexDefinitions)
Returns the indexes for which AOT blob downloading is enabled, that is, for which the index name starts with any of the prefixes in the enabledForIndexes list.- Parameters:
enabledIndexesPrefixes
- list of prefixes of the index definitions that benefit from the downloadindexDefinitions
- the index definitions- Returns:
- the indexers for which AOT blob download is enabled, or empty list if it is not enabled for any
-
isEnabledForAnyOfIndexes
public static boolean isEnabledForAnyOfIndexes(List<String> enableIndexesPrefix, List<String> indexPaths)
Whether blob downloading is needed for any the given indexes.- Parameters:
enableIndexesPrefix
- list of prefixes of the index definitions that benefit from the downloadindexPaths
- the index paths- Returns:
- true if any of the indexes start with any of the prefixes
-
iterator
@NotNull public @NotNull Iterator<NodeStateEntry> iterator()
- Specified by:
iterator
in interfaceIndexStore
- Specified by:
iterator
in interfaceIterable<NodeStateEntry>
-
getStorePath
public String getStorePath()
- Specified by:
getStorePath
in interfaceIndexStore
-
getEntryCount
public long getEntryCount()
- Specified by:
getEntryCount
in interfaceIndexStore
-
setEntryCount
public void setEntryCount(long entryCount)
- Specified by:
setEntryCount
in interfaceIndexStore
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceIndexStore
- Throws:
IOException
-
getIndexStoreType
public String getIndexStoreType()
- Specified by:
getIndexStoreType
in interfaceIndexStore
-
isIncremental
public boolean isIncremental()
- Specified by:
isIncremental
in interfaceIndexStore
-
-