public class DefaultConfluenceIndexManager extends Object implements ConfluenceIndexManager
ConfluenceIndexManager.IndexQueueFlushMode
Modifier and Type | Field and Description |
---|---|
static String |
QUEUE_BATCH_SIZE_KEY |
Constructor and Description |
---|
DefaultConfluenceIndexManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
flushQueue()
Flush the index queue, processing all of the tasks.
|
boolean |
flushQueue(boolean batch)
Deprecated.
|
boolean |
flushQueue(ConfluenceIndexManager.IndexQueueFlushMode flushMode)
Flush the index queue, processing a batch of the tasks
|
FlushStatistics |
getLastNonEmptyFlushStats() |
ReIndexTask |
getLastReindexingTask()
Retrieve the last reindexing task.
|
IndexTaskQueue |
getTaskQueue()
Retrieve the index task queue that is being used by Confluence.
|
boolean |
isFlushing()
Is the index queue currently being flushed?
|
boolean |
isReIndexing()
Check whether or not reindexing is currently in progress.
|
void |
optimizeIndex()
Enqueues an Optimize Index Task
|
ReIndexTask |
reIndex()
Trigger a system wide reindex of all content.
|
ReIndexTask |
reIndex(Set<ReIndexOption> options)
Trigger a system wide reindex with specified options.
|
ReIndexTask |
reIndex(Set<ReIndexOption> options,
SearchQuery luceneQuery)
Trigger an asynchronous reindex of the system.
|
void |
resetIndexQueue()
Delete all of the entries on the index queue.
|
void |
setEventManager(com.atlassian.event.EventManager eventManager) |
void |
setIndexTaskFactory(IndexTaskFactory indexTaskFactory) |
void |
setIndexTaskPerformer(IndexTaskPerformer indexTaskPerformer) |
void |
setLuceneConnection(com.atlassian.bonnie.ILuceneConnection luceneConnection) |
void |
setReIndexer(ReIndexer reIndexer) |
void |
setSearchableDao(SearchableDao searchableDao) |
void |
setTaskQueue(IndexTaskQueue<ConfluenceIndexTask> taskQueue) |
void |
unIndexAll() |
public static final String QUEUE_BATCH_SIZE_KEY
public boolean isFlushing()
isFlushing
in interface ConfluenceIndexManager
public boolean flushQueue()
ConfluenceIndexManager
flushQueue
in interface ConfluenceIndexManager
@Deprecated public boolean flushQueue(boolean batch)
flushQueue
in interface ConfluenceIndexManager
batch
- - whether to flush the entire queue, or just one batch of batchsize as specified by
the system property index.queue.batch.sizepublic boolean flushQueue(ConfluenceIndexManager.IndexQueueFlushMode flushMode)
ConfluenceIndexManager
flushQueue
in interface ConfluenceIndexManager
flushMode
- - whether to flush the entire queue, or just one batch of batchsize as specified by
the system property index.queue.batch.sizepublic void resetIndexQueue()
resetIndexQueue
in interface ConfluenceIndexManager
public void optimizeIndex()
ConfluenceIndexManager
optimizeIndex
in interface ConfluenceIndexManager
public ReIndexTask reIndex()
reIndex
in interface ConfluenceIndexManager
public ReIndexTask reIndex(Set<ReIndexOption> options)
reIndex
in interface ConfluenceIndexManager
public ReIndexTask reIndex(Set<ReIndexOption> options, SearchQuery luceneQuery)
getLastReindexingTask()
.reIndex
in interface ConfluenceIndexManager
options
- Allows a subset of all searchable content to be re-indexed.luceneQuery
- Optional. A lucene query that may be used to load the entities to be re-indexed.
Pass null to index all entities from the database.public boolean isReIndexing()
isReIndexing
in interface ConfluenceIndexManager
public ReIndexTask getLastReindexingTask()
getLastReindexingTask
in interface ConfluenceIndexManager
public void unIndexAll()
unIndexAll
in interface ConfluenceIndexManager
public IndexTaskQueue getTaskQueue()
getTaskQueue
in interface ConfluenceIndexManager
public FlushStatistics getLastNonEmptyFlushStats()
getLastNonEmptyFlushStats
in interface ConfluenceIndexManager
public void setIndexTaskFactory(IndexTaskFactory indexTaskFactory)
public void setIndexTaskPerformer(IndexTaskPerformer indexTaskPerformer)
public void setEventManager(com.atlassian.event.EventManager eventManager)
public void setReIndexer(ReIndexer reIndexer)
public void setSearchableDao(SearchableDao searchableDao)
public void setTaskQueue(IndexTaskQueue<ConfluenceIndexTask> taskQueue)
taskQueue
- set by dependency injection, requiredpublic void setLuceneConnection(com.atlassian.bonnie.ILuceneConnection luceneConnection)
luceneConnection
- set by dependency injection, requiredCopyright © 2003–2015 Atlassian. All rights reserved.