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 StringBLOB_PREFETCH_BINARY_NODES_SUFFIXstatic StringBLOB_PREFETCH_DOWNLOAD_AHEAD_WINDOW_MBstatic StringBLOB_PREFETCH_DOWNLOAD_AHEAD_WINDOW_SIZEstatic StringBLOB_PREFETCH_DOWNLOAD_THREADSstatic StringBLOB_PREFETCH_ENABLE_FOR_INDEXES_PREFIXES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()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.longgetEntryCount()StringgetIndexStoreType()StringgetStorePath()static booleanisEnabledForAnyOfIndexes(List<String> enableIndexesPrefix, List<String> indexPaths)Whether blob downloading is needed for any the given indexes.booleanisIncremental()@NotNull Iterator<NodeStateEntry>iterator()voidsetEntryCount(long entryCount)static List<String>splitAndTrim(String str)static AheadOfTimeBlobDownloadingFlatFileStorewrap(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:
iteratorin interfaceIndexStore- Specified by:
iteratorin interfaceIterable<NodeStateEntry>
-
getStorePath
public String getStorePath()
- Specified by:
getStorePathin interfaceIndexStore
-
getEntryCount
public long getEntryCount()
- Specified by:
getEntryCountin interfaceIndexStore
-
setEntryCount
public void setEntryCount(long entryCount)
- Specified by:
setEntryCountin interfaceIndexStore
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceIndexStore- Throws:
IOException
-
getIndexStoreType
public String getIndexStoreType()
- Specified by:
getIndexStoreTypein interfaceIndexStore
-
isIncremental
public boolean isIncremental()
- Specified by:
isIncrementalin interfaceIndexStore
-
-