Package com.logicaldoc.core.searchengine
Class IndexerTask
java.lang.Object
com.logicaldoc.core.task.Task
com.logicaldoc.core.searchengine.IndexerTask
- All Implemented Interfaces:
Runnable
This task enlists all non-indexed documents and performs the indexing
- Since:
- 4.0
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
FieldsFields inherited from class com.logicaldoc.core.task.Task
STATUS_IDLE, STATUS_RUNNING, STATUS_STOPPING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanConcrete implementations must override this method declaring if the task supports multiple instances running concurrently.booleanConcrete implementations must override this method declaring if the task is indeterminate.static voidStops all the Indexer threadsstatic String[]Prepares the query to search the documents to be indexedvoidsetDocumentDao(DocumentDAO documentDao) voidsetDocumentManager(DocumentManager documentManager) voidsetIndexer(SearchEngine indexer) voidsetTenantDao(TenantDAO tenantDao) Methods inherited from class com.logicaldoc.core.task.Task
addTaskListener, getCompletionPercentage, getConfig, getName, getProgress, getReportRecipients, getScheduling, getSize, getStatus, interrupt, isInterrupted, isInterruptRequested, isRunning, isSendActivityReport, notifyReport, removeTaskListener, run, save, saveWork, setReportRecipients, setSendActivityReport, setSize
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
IndexerTask
public IndexerTask()
-
-
Method Details
-
setDocumentManager
-
setDocumentDao
-
isIndeterminate
public boolean isIndeterminate()Description copied from class:TaskConcrete implementations must override this method declaring if the task is indeterminate. An indeterminate task is not able to compute it's time length- Specified by:
isIndeterminatein classTask- Returns:
- true if the task is indeterminate
-
isConcurrent
public boolean isConcurrent()Description copied from class:TaskConcrete implementations must override this method declaring if the task supports multiple instances running concurrently.- Specified by:
isConcurrentin classTask- Returns:
- true if the task is concurrent
-
prepareQuery
Prepares the query to search the documents to be indexed- Returns:
- array composed by the query to execute and the sorting expression
-
setIndexer
-
setTenantDao
-
killIndexerThreads
public static void killIndexerThreads()Stops all the Indexer threads
-