Class CompositeIndexManager
java.lang.Object
com.atlassian.confluence.impl.search.CompositeIndexManager
- All Implemented Interfaces:
- IndexManager
Allows us to use multiple 
IndexManagers under the hood whilst maintaining backwards compatibility- Since:
- 7.9.0
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.atlassian.confluence.search.IndexManagerIndexManager.IndexQueueFlushMode
- 
Field SummaryFields inherited from interface com.atlassian.confluence.search.IndexManagerREINDEX_SPACES_DARK_FEATURE
- 
Constructor SummaryConstructorsConstructorDescriptionCompositeIndexManager(List<IncrementalIndexManager> incrementalManagers, IndexTaskQueue<ConfluenceIndexTask> compositeTaskQueue, FullReindexManager fullReindexManager) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddTask(ConfluenceIndexTask task) Adds a new task to the index queuebooleanflushQueue(IndexManager.IndexQueueFlushMode flushMode) Flushes the index queue, processing a batch of the tasksbooleanflushQueueWithLockTimeout(IndexManager.IndexQueueFlushMode flushMode, int lockTimeout, TimeUnit lockTimeoutUnit) Flushes the index queue with a specified lock timeout.intDeprecated.since 7.9.0.booleanReturns true if the index queue is currently being flushed.booleanReturns true if the system is currently being reindexed.voidRefresh the index immediately, which publishes its most recent changes and makes them available for searching.reIndex()Triggers a system wide reindex of all content.reIndex(EnumSet<ReIndexOption> options) Triggers a system wide reindex with specified options, entities are loaded from the database.reIndex(EnumSet<ReIndexOption> options, SearchQuery searchQuery) Triggers a system wide re-index.reIndex(EnumSet<ReIndexOption> options, @NonNull List<String> spaceKeys) voidResets the index queue removes all entries from the queue without processing them.voidMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.search.IndexManagerflushQueue
- 
Constructor Details- 
CompositeIndexManagerpublic CompositeIndexManager(List<IncrementalIndexManager> incrementalManagers, IndexTaskQueue<ConfluenceIndexTask> compositeTaskQueue, FullReindexManager fullReindexManager) 
 
- 
- 
Method Details- 
isFlushingpublic boolean isFlushing()Description copied from interface:IndexManagerReturns true if the index queue is currently being flushed.- Specified by:
- isFlushingin interface- IndexManager
- 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 interface- IndexManager
- 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
 
- 
flushQueueWithLockTimeout@Transactional(readOnly=true, propagation=REQUIRED) public boolean flushQueueWithLockTimeout(IndexManager.IndexQueueFlushMode flushMode, int lockTimeout, TimeUnit lockTimeoutUnit) Description copied from interface:IndexManagerFlushes the index queue with a specified lock timeout. This method processes a batch of tasks from the index queue, allowing the caller to define a custom timeout for acquiring a lock on the index.- Specified by:
- flushQueueWithLockTimeoutin interface- IndexManager
- Parameters:
- flushMode- Specifies whether to flush the entire queue or just a batch of tasks. The batch size is determined by the system property- index.queue.batch.size.
- lockTimeout- The maximum time to wait for acquiring the lock, specified as an integer value.
- lockTimeoutUnit- The unit of time for the lock timeout, specified as a- TimeUnit.
- Returns:
- trueif the queue was successfully flushed,- falseotherwise.
- See Also:
 
- 
reIndexDescription copied from interface:IndexManagerTriggers a system wide reindex of all content.- Specified by:
- reIndexin interface- IndexManager
 
- 
reIndexDescription copied from interface:IndexManagerTriggers a system wide reindex with specified options, entities are loaded from the database.- Specified by:
- reIndexin interface- IndexManager
 
- 
reIndexDescription copied from interface:IndexManagerTriggers a system wide re-index.- Specified by:
- reIndexin interface- IndexManager
- 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- Specified by:
- reIndexin interface- IndexManager
 
- 
unIndexAllpublic void unIndexAll()- Specified by:
- unIndexAllin interface- IndexManager
 
- 
getLastReindexingTask- Specified by:
- getLastReindexingTaskin interface- IndexManager
 
- 
isReIndexingpublic boolean isReIndexing()Description copied from interface:IndexManagerReturns true if the system is currently being reindexed.- Specified by:
- isReIndexingin interface- IndexManager
- Returns:
- true if flushing, false otherwise.
 
- 
resetIndexQueuepublic void resetIndexQueue()Description copied from interface:IndexManagerResets the index queue removes all entries from the queue without processing them.- Specified by:
- resetIndexQueuein interface- IndexManager
 
- 
getTaskQueueDeprecated.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 interface- IndexManager
 
- 
getLastNonEmptyFlushStats- Specified by:
- getLastNonEmptyFlushStatsin interface- IndexManager
 
- 
getQueueSizepublic int getQueueSize()- Specified by:
- getQueueSizein interface- IndexManager
- Returns:
- the number of pending items in the corresponding index queue
 
- 
addTaskDescription copied from interface:IndexManagerAdds a new task to the index queue- Specified by:
- addTaskin interface- IndexManager
 
- 
refreshIndexDescription copied from interface:IndexManagerRefresh the index immediately, which publishes its most recent changes and makes them available for searching. This method is only applicable to the OpenSearch platform.- Specified by:
- refreshIndexin interface- IndexManager
- Throws:
- IOException
 
 
-