Package com.atlassian.confluence.search
Interface IndexManager
-
- All Known Implementing Classes:
CompositeIndexManager
public interface IndexManager
The entry point to the Indexing Subsystem.- Since:
- 5.10
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IndexManager.IndexQueueFlushMode
Enum indicating the mode in which to flush the queue.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
addTask(ConfluenceIndexTask task)
Adds a new task to the index queuedefault boolean
flushQueue()
Flushes the index queue, processing all of the tasks.boolean
flushQueue(IndexManager.IndexQueueFlushMode flushMode)
Flushes the index queue, processing a batch of the tasksFlushStatistics
getLastNonEmptyFlushStats()
ReIndexTask
getLastReindexingTask()
int
getQueueSize()
IndexTaskQueue
getTaskQueue()
Deprecated.since 7.9.0 UseIndexManager
methods instead of calling corresponding methods on queue directly.boolean
isFlushing()
Returns true if the index queue is currently being flushed.default boolean
isReIndexing()
Returns true if the system is currently being reindexed.default ReIndexTask
reIndex()
Triggers a system wide reindex of all content.ReIndexTask
reIndex(EnumSet<ReIndexOption> options)
Triggers a system wide reindex with specified options, entities are loaded from the database.ReIndexTask
reIndex(EnumSet<ReIndexOption> options, SearchQuery searchQuery)
Triggers a system wide re-index.void
resetIndexQueue()
Resets the index queue removes all entries from the queue without processing them.void
unIndexAll()
-
-
-
Method Detail
-
isFlushing
boolean isFlushing()
Returns true if the index queue is currently being flushed.- Returns:
- true if flushing, false otherwise.
-
isReIndexing
default boolean isReIndexing()
Returns true if the system is currently being reindexed.- Returns:
- true if flushing, false otherwise.
-
flushQueue
boolean flushQueue(IndexManager.IndexQueueFlushMode flushMode)
Flushes the index queue, processing a batch of the tasks- 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
-
flushQueue
default boolean flushQueue()
Flushes the index queue, processing all of the tasks.- Returns:
- whether the flush actually took place
-
reIndex
default ReIndexTask reIndex()
Triggers a system wide reindex of all content.
-
reIndex
ReIndexTask reIndex(EnumSet<ReIndexOption> options)
Triggers a system wide reindex with specified options, entities are loaded from the database.
-
reIndex
ReIndexTask reIndex(EnumSet<ReIndexOption> options, SearchQuery searchQuery)
Triggers a system wide re-index.- 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.
-
unIndexAll
void unIndexAll()
-
getLastReindexingTask
ReIndexTask getLastReindexingTask()
-
resetIndexQueue
void resetIndexQueue()
Resets the index queue removes all entries from the queue without processing them.
-
getTaskQueue
@Deprecated IndexTaskQueue getTaskQueue()
Deprecated.since 7.9.0 UseIndexManager
methods instead of calling corresponding methods on queue directly. This method is deprecated because Confluence will no longer have only one index queueRetrieves the index task queue that is being used by this manager.
-
getLastNonEmptyFlushStats
FlushStatistics getLastNonEmptyFlushStats()
-
getQueueSize
int getQueueSize()
- Returns:
- the number of pending items in the corresponding index queue
- Since:
- 7.9.0
-
addTask
void addTask(ConfluenceIndexTask task)
Adds a new task to the index queue
-
-