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 String
QUEUE_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 void
addTask(ConfluenceIndexTask task)
Adds a new task to the index queueboolean
flushQueue(IndexManager.IndexQueueFlushMode flushMode)
Flushes the index queue, processing a batch of the tasksFlushStatistics
getLastNonEmptyFlushStats()
int
getQueueSize()
boolean
isFlushing()
Returns true if the index queue is currently being flushed.void
resetIndexQueue()
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:IncrementalIndexManager
Returns true if the index queue is currently being flushed.- Specified by:
isFlushing
in interfaceIncrementalIndexManager
- Returns:
- true if flushing, false otherwise.
-
flushQueue
@Transactional(readOnly=true, propagation=REQUIRED) public boolean flushQueue(IndexManager.IndexQueueFlushMode flushMode)
Description copied from interface:IncrementalIndexManager
Flushes the index queue, processing a batch of the tasks- Specified by:
flushQueue
in 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:
resetIndexQueue
in interfaceIncrementalIndexManager
-
getLastNonEmptyFlushStats
@Transactional(readOnly=true, propagation=SUPPORTS) public FlushStatistics getLastNonEmptyFlushStats()
- Specified by:
getLastNonEmptyFlushStats
in interfaceIncrementalIndexManager
- Returns:
- the information about last queue flush.
null
if no flush has occured from system start.
-
getQueueSize
@Transactional(readOnly=true, propagation=SUPPORTS) public int getQueueSize()
- Specified by:
getQueueSize
in 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:IncrementalIndexManager
Adds a new task to the index queue- Specified by:
addTask
in interfaceIncrementalIndexManager
-
-