Class CompositeIndexManager
java.lang.Object
com.atlassian.confluence.impl.search.CompositeIndexManager
- All Implemented Interfaces:
IndexManager
Allows us to use multiple
IndexManager
s 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
ConstructorDescriptionCompositeIndexManager
(List<IncrementalIndexManager> incrementalManagers, IndexTaskQueue<ConfluenceIndexTask> compositeTaskQueue, FullReindexManager fullReindexManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTask
(ConfluenceIndexTask task) Adds a new task to the index queueboolean
flushQueue
(IndexManager.IndexQueueFlushMode flushMode) Flushes the index queue, processing a batch of the tasksint
Deprecated.since 7.9.0.boolean
Returns true if the index queue is currently being flushed.boolean
Returns true if the system is currently being reindexed.void
Refresh 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, @NonNull List<String> spaceKeys) reIndex
(EnumSet<ReIndexOption> options, SearchQuery searchQuery) Triggers a system wide re-index.void
Resets the index queue removes all entries from the queue without processing them.void
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 Details
-
CompositeIndexManager
public CompositeIndexManager(List<IncrementalIndexManager> incrementalManagers, IndexTaskQueue<ConfluenceIndexTask> compositeTaskQueue, FullReindexManager fullReindexManager)
-
-
Method Details
-
isFlushing
public boolean isFlushing()Description copied from interface:IndexManager
Returns true if the index queue is currently being flushed.- Specified by:
isFlushing
in interfaceIndexManager
- Returns:
- true if flushing, false otherwise.
-
flushQueue
@Transactional(readOnly=true, propagation=REQUIRED) public boolean flushQueue(IndexManager.IndexQueueFlushMode flushMode) Description copied from interface:IndexManager
Flushes the index queue, processing a batch of the tasks- Specified by:
flushQueue
in 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
Description copied from interface:IndexManager
Triggers a system wide reindex of all content.- Specified by:
reIndex
in interfaceIndexManager
-
reIndex
Description copied from interface:IndexManager
Triggers a system wide reindex with specified options, entities are loaded from the database.- Specified by:
reIndex
in interfaceIndexManager
-
reIndex
Description copied from interface:IndexManager
Triggers a system wide re-index.- Specified by:
reIndex
in 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
- Specified by:
reIndex
in interfaceIndexManager
-
unIndexAll
public void unIndexAll()- Specified by:
unIndexAll
in interfaceIndexManager
-
getLastReindexingTask
- Specified by:
getLastReindexingTask
in interfaceIndexManager
-
isReIndexing
public boolean isReIndexing()Description copied from interface:IndexManager
Returns true if the system is currently being reindexed.- Specified by:
isReIndexing
in interfaceIndexManager
- Returns:
- true if flushing, false otherwise.
-
resetIndexQueue
public void resetIndexQueue()Description copied from interface:IndexManager
Resets the index queue removes all entries from the queue without processing them.- Specified by:
resetIndexQueue
in interfaceIndexManager
-
getTaskQueue
Deprecated.since 7.9.0. Please useIndexManager.getQueueSize()
andIndexManager.addTask(ConfluenceIndexTask)
Description copied from interface:IndexManager
Retrieves the index task queue that is being used by this manager.- Specified by:
getTaskQueue
in interfaceIndexManager
-
getLastNonEmptyFlushStats
- Specified by:
getLastNonEmptyFlushStats
in interfaceIndexManager
-
getQueueSize
public int getQueueSize()- Specified by:
getQueueSize
in interfaceIndexManager
- Returns:
- the number of pending items in the corresponding index queue
-
addTask
Description copied from interface:IndexManager
Adds a new task to the index queue- Specified by:
addTask
in interfaceIndexManager
-
refreshIndex
Description copied from interface:IndexManager
Refresh 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:
refreshIndex
in interfaceIndexManager
- Throws:
IOException
-