Class IndexTracker
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker
-
public class IndexTracker extends java.lang.Object
Keeps track of all Lucene indexes in a repository (all readers, writers, and definitions).
-
-
Constructor Summary
Constructors Constructor Description IndexTracker()
IndexTracker(IndexCopier cloner)
IndexTracker(org.apache.jackrabbit.oak.plugins.index.lucene.reader.LuceneIndexReaderFactory readerFactory)
IndexTracker(org.apache.jackrabbit.oak.plugins.index.lucene.reader.LuceneIndexReaderFactory readerFactory, @Nullable org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.NRTIndexFactory nrtFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable LuceneIndexNode
acquireIndexNode(java.lang.String path)
Acquire the index node, if the index is good.void
close()
AsyncIndexInfoService
getAsyncIndexInfoService()
org.apache.jackrabbit.oak.plugins.index.search.BadIndexTracker
getBadIndexTracker()
@Nullable LuceneIndexDefinition
getIndexDefinition(java.lang.String indexPath)
java.util.Set<java.lang.String>
getIndexNodePaths()
MountInfoProvider
getMountInfoProvider()
NodeState
getRoot()
void
refresh()
void
setAsyncIndexInfoService(AsyncIndexInfoService asyncIndexInfoService)
void
update(NodeState root)
-
-
-
Constructor Detail
-
IndexTracker
public IndexTracker()
-
IndexTracker
public IndexTracker(IndexCopier cloner)
-
IndexTracker
public IndexTracker(org.apache.jackrabbit.oak.plugins.index.lucene.reader.LuceneIndexReaderFactory readerFactory)
-
IndexTracker
public IndexTracker(org.apache.jackrabbit.oak.plugins.index.lucene.reader.LuceneIndexReaderFactory readerFactory, @Nullable @Nullable org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.NRTIndexFactory nrtFactory)
-
-
Method Detail
-
getMountInfoProvider
public MountInfoProvider getMountInfoProvider()
-
close
public void close()
-
update
public void update(NodeState root)
-
setAsyncIndexInfoService
public void setAsyncIndexInfoService(AsyncIndexInfoService asyncIndexInfoService)
-
getAsyncIndexInfoService
public AsyncIndexInfoService getAsyncIndexInfoService()
-
refresh
public void refresh()
-
acquireIndexNode
@Nullable public @Nullable LuceneIndexNode acquireIndexNode(java.lang.String path)
Acquire the index node, if the index is good.- Parameters:
path
- the index path- Returns:
- the index node, or null if it's a bad (corrupt) index
-
getIndexDefinition
@Nullable public @Nullable LuceneIndexDefinition getIndexDefinition(java.lang.String indexPath)
-
getIndexNodePaths
public java.util.Set<java.lang.String> getIndexNodePaths()
-
getBadIndexTracker
public org.apache.jackrabbit.oak.plugins.index.search.BadIndexTracker getBadIndexTracker()
-
getRoot
public NodeState getRoot()
-
-