com.atlassian.confluence.search.lucene
Class DefaultConfluenceIndexManager

java.lang.Object
  extended bycom.atlassian.confluence.search.lucene.DefaultConfluenceIndexManager
All Implemented Interfaces:
ConfluenceIndexManager

public class DefaultConfluenceIndexManager
extends Object
implements ConfluenceIndexManager

The Confluence Index Manager is the entry point to the majority of the indexing subsystem..


Field Summary
static org.apache.log4j.Category log
           
 
Constructor Summary
DefaultConfluenceIndexManager()
           
 
Method Summary
 void flushQueue()
          Trigger a index queue flush.
 FlushStatistics getLastNonEmptyFlushStats()
           
 IndexingTask 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
 void reIndex()
          Trigger an asynchronous reindex of the system.
 void resetIndexQueue()
          Delete all of the entries on the index queue.
 void setIndexTaskFactory(IndexTaskFactory indexTaskFactory)
           
 void setLuceneConnection(ConfluenceLuceneConnection luceneConnection)
          LuceneConnection is a required resource.
 void setTaskQueue(IndexTaskQueue taskQueue)
          Required resource.
 void unIndexAll()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final org.apache.log4j.Category log
Constructor Detail

DefaultConfluenceIndexManager

public DefaultConfluenceIndexManager()
Method Detail

isFlushing

public boolean isFlushing()
Is the index queue currently being flushed?

Specified by:
isFlushing in interface ConfluenceIndexManager
Returns:
true if the queue flush is in progress, false otherwise.

flushQueue

public void flushQueue()
Trigger a index queue flush.

Specified by:
flushQueue in interface ConfluenceIndexManager

resetIndexQueue

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 interface ConfluenceIndexManager

optimizeIndex

public void optimizeIndex()
Description copied from interface: ConfluenceIndexManager
Enqueues an Optimize Index Task

Specified by:
optimizeIndex in interface ConfluenceIndexManager

reIndex

public void reIndex()
Trigger an asynchronous reindex of the system. The progress of this task can be monitored via the getLastReindexingTask().

Specified by:
reIndex in interface ConfluenceIndexManager

isReIndexing

public boolean isReIndexing()
Check whether or not reindexing is currently in progress.

Specified by:
isReIndexing in interface ConfluenceIndexManager
Returns:
true if reindexing is running, false otherwise.

getLastReindexingTask

public IndexingTask getLastReindexingTask()
Retrieve the last reindexing task. This task will provide all of the information required to track the progress/state of the reindexing process.

Specified by:
getLastReindexingTask in interface ConfluenceIndexManager
Returns:
the last executed reindex task, or null if no reindex has occured.

unIndexAll

public void unIndexAll()
Specified by:
unIndexAll in interface ConfluenceIndexManager

getTaskQueue

public IndexTaskQueue getTaskQueue()
Retrieve the index task queue that is being used by Confluence. This instance can also be retrieved by spring.

Specified by:
getTaskQueue in interface ConfluenceIndexManager

getLastNonEmptyFlushStats

public FlushStatistics getLastNonEmptyFlushStats()
Specified by:
getLastNonEmptyFlushStats in interface ConfluenceIndexManager

setIndexTaskFactory

public void setIndexTaskFactory(IndexTaskFactory indexTaskFactory)

setTaskQueue

public void setTaskQueue(IndexTaskQueue taskQueue)
Required resource.

Parameters:
taskQueue -

setLuceneConnection

public void setLuceneConnection(ConfluenceLuceneConnection luceneConnection)
LuceneConnection is a required resource.

Parameters:
luceneConnection -


Confluence is developed by Atlassian.