Class LuceneIncrementalIndexManager
- java.lang.Object
-
- com.atlassian.confluence.internal.search.LuceneIncrementalIndexManager
-
- All Implemented Interfaces:
IncrementalIndexManager
@LuceneIndependent @Internal public class LuceneIncrementalIndexManager extends Object implements IncrementalIndexManager
Entry point to the majority of the Lucene indexing subsystem.- Since:
- 7.9.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringQUEUE_BATCH_SIZE_KEY
-
Constructor Summary
Constructors Constructor Description LuceneIncrementalIndexManager(IndexLockService lockService, IndexTaskQueue<ConfluenceIndexTask> taskQueue, SearchIndexAccessor searchIndexAccessor, com.atlassian.event.api.EventPublisher eventPublisher, FullReindexManager fullReindexManager, SearchIndex targetIndex)
-
Method Summary
All Methods Instance Methods Concrete 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()intgetQueueSize()booleanisFlushing()Returns true if the index queue is currently being flushed.voidresetIndexQueue()Delete all of the entries on the index queue.-
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.internal.search.IncrementalIndexManager
flushQueue
-
-
-
-
Field Detail
-
QUEUE_BATCH_SIZE_KEY
public static final String QUEUE_BATCH_SIZE_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LuceneIncrementalIndexManager
public LuceneIncrementalIndexManager(IndexLockService lockService, IndexTaskQueue<ConfluenceIndexTask> taskQueue, SearchIndexAccessor searchIndexAccessor, com.atlassian.event.api.EventPublisher eventPublisher, FullReindexManager fullReindexManager, SearchIndex targetIndex)
-
-
Method Detail
-
isFlushing
@Transactional(readOnly=true, propagation=SUPPORTS) public boolean isFlushing()Description copied from interface:IncrementalIndexManagerReturns true if the index queue is currently being flushed.- Specified by:
isFlushingin interfaceIncrementalIndexManager- Returns:
- true if flushing, false otherwise.
-
flushQueue
@Transactional(readOnly=true, propagation=REQUIRED) public boolean flushQueue(IndexManager.IndexQueueFlushMode flushMode)Description copied from interface:IncrementalIndexManagerFlushes the index queue, processing a batch of the tasks- Specified by:
flushQueuein interfaceIncrementalIndexManager- 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
-
resetIndexQueue
@Transactional(propagation=REQUIRED) public void resetIndexQueue()
Delete all of the entries on the index queue. This should NOT be called during the normal running of Confluence since all pending Index Tasks will be deleted WITHOUT being processed.- Specified by:
resetIndexQueuein interfaceIncrementalIndexManager
-
getLastNonEmptyFlushStats
@Transactional(readOnly=true, propagation=SUPPORTS) public FlushStatistics getLastNonEmptyFlushStats()- Specified by:
getLastNonEmptyFlushStatsin interfaceIncrementalIndexManager- Returns:
- the information about last queue flush.
nullif no flush has occured from system start.
-
getQueueSize
@Transactional(readOnly=true, propagation=SUPPORTS) public int getQueueSize()- Specified by:
getQueueSizein interfaceIncrementalIndexManager- Returns:
- the number of pending items in the corresponding index queue
-
addTask
@Transactional(propagation=REQUIRED) public void addTask(ConfluenceIndexTask task)
Description copied from interface:IncrementalIndexManagerAdds a new task to the index queue- Specified by:
addTaskin interfaceIncrementalIndexManager
-
-