Class CompositeIndexManager
- java.lang.Object
-
- com.atlassian.confluence.impl.search.CompositeIndexManager
-
- All Implemented Interfaces:
IndexManager
public class CompositeIndexManager extends Object implements IndexManager
Allows us to use multipleIndexManagers under the hood whilst maintaining backwards compatibility- Since:
- 7.9.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.atlassian.confluence.search.IndexManager
IndexManager.IndexQueueFlushMode
-
-
Field Summary
-
Fields inherited from interface com.atlassian.confluence.search.IndexManager
REINDEX_SPACES_DARK_FEATURE
-
-
Constructor Summary
Constructors Constructor Description CompositeIndexManager(List<IncrementalIndexManager> incrementalManagers, IndexTaskQueue<ConfluenceIndexTask> compositeTaskQueue, FullReindexManager fullReindexManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddTask(ConfluenceIndexTask task)Adds a new task to the index queuebooleanflushQueue(IndexManager.IndexQueueFlushMode flushMode)Flushes the index queue, processing a batch of the tasksFlushStatisticsgetLastNonEmptyFlushStats()ReIndexTaskgetLastReindexingTask()intgetQueueSize()IndexTaskQueue<ConfluenceIndexTask>getTaskQueue()Deprecated.since 7.9.0.booleanisFlushing()Returns true if the index queue is currently being flushed.booleanisReIndexing()Returns true if the system is currently being reindexed.ReIndexTaskreIndex()Triggers a system wide reindex of all content.ReIndexTaskreIndex(EnumSet<ReIndexOption> options)Triggers a system wide reindex with specified options, entities are loaded from the database.ReIndexTaskreIndex(EnumSet<ReIndexOption> options, @NonNull List<String> spaceKeys)ReIndexTaskreIndex(EnumSet<ReIndexOption> options, SearchQuery searchQuery)Triggers a system wide re-index.voidresetIndexQueue()Resets the index queue removes all entries from the queue without processing them.voidunIndexAll()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.search.IndexManager
flushQueue
-
-
-
-
Constructor Detail
-
CompositeIndexManager
public CompositeIndexManager(List<IncrementalIndexManager> incrementalManagers, IndexTaskQueue<ConfluenceIndexTask> compositeTaskQueue, FullReindexManager fullReindexManager)
-
-
Method Detail
-
isFlushing
public boolean isFlushing()
Description copied from interface:IndexManagerReturns true if the index queue is currently being flushed.- Specified by:
isFlushingin interfaceIndexManager- Returns:
- true if flushing, false otherwise.
-
flushQueue
@Transactional(readOnly=true, propagation=REQUIRED) public boolean flushQueue(IndexManager.IndexQueueFlushMode flushMode)Description copied from interface:IndexManagerFlushes the index queue, processing a batch of the tasks- Specified by:
flushQueuein interfaceIndexManager- Parameters:
flushMode- - whether to flush the entire queue, or just one batch of batchsize as specified by the system property index.queue.batch.size- Returns:
- whether the flush actually took place
-
reIndex
public ReIndexTask reIndex()
Description copied from interface:IndexManagerTriggers a system wide reindex of all content.- Specified by:
reIndexin interfaceIndexManager
-
reIndex
public ReIndexTask reIndex(EnumSet<ReIndexOption> options)
Description copied from interface:IndexManagerTriggers a system wide reindex with specified options, entities are loaded from the database.- Specified by:
reIndexin interfaceIndexManager
-
reIndex
public ReIndexTask reIndex(EnumSet<ReIndexOption> options, SearchQuery searchQuery)
Description copied from interface:IndexManagerTriggers a system wide re-index.- Specified by:
reIndexin interfaceIndexManager- Parameters:
options- Optional. Allows a subset of all searchable content to be re-indexed.searchQuery- A query that is used to load the entities to be re-indexed.
-
reIndex
public ReIndexTask reIndex(EnumSet<ReIndexOption> options, @NonNull List<String> spaceKeys)
- Specified by:
reIndexin interfaceIndexManager
-
unIndexAll
public void unIndexAll()
- Specified by:
unIndexAllin interfaceIndexManager
-
getLastReindexingTask
public ReIndexTask getLastReindexingTask()
- Specified by:
getLastReindexingTaskin interfaceIndexManager
-
isReIndexing
public boolean isReIndexing()
Description copied from interface:IndexManagerReturns true if the system is currently being reindexed.- Specified by:
isReIndexingin interfaceIndexManager- Returns:
- true if flushing, false otherwise.
-
resetIndexQueue
public void resetIndexQueue()
Description copied from interface:IndexManagerResets the index queue removes all entries from the queue without processing them.- Specified by:
resetIndexQueuein interfaceIndexManager
-
getTaskQueue
@Deprecated public IndexTaskQueue<ConfluenceIndexTask> getTaskQueue()
Deprecated.since 7.9.0. Please useIndexManager.getQueueSize()andIndexManager.addTask(ConfluenceIndexTask)Description copied from interface:IndexManagerRetrieves the index task queue that is being used by this manager.- Specified by:
getTaskQueuein interfaceIndexManager
-
getLastNonEmptyFlushStats
public FlushStatistics getLastNonEmptyFlushStats()
- Specified by:
getLastNonEmptyFlushStatsin interfaceIndexManager
-
getQueueSize
public int getQueueSize()
- Specified by:
getQueueSizein interfaceIndexManager- Returns:
- the number of pending items in the corresponding index queue
-
addTask
@Transactional(propagation=REQUIRED) public void addTask(ConfluenceIndexTask task)
Description copied from interface:IndexManagerAdds a new task to the index queue- Specified by:
addTaskin interfaceIndexManager
-
-