Package com.logicaldoc.core.searchengine
Class IndexerTask
- java.lang.Object
-
- com.logicaldoc.core.task.Task
-
- com.logicaldoc.core.searchengine.IndexerTask
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAME
-
Fields inherited from class com.logicaldoc.core.task.Task
STATUS_IDLE, STATUS_RUNNING, STATUS_STOPPING
-
-
Constructor Summary
Constructors Constructor Description IndexerTask()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isConcurrent()
Concrete implementations must override this method declaring if the task supports multiple instances running concurrently.boolean
isIndeterminate()
Concrete implementations must override this method declaring if the task is indeterminate.static void
killIndexerThreads()
Stops all the Indexer threadsstatic String[]
prepareQuery()
Prepares the query to search the documents to be indexedvoid
setDocumentDao(DocumentDAO documentDao)
void
setDocumentManager(DocumentManager documentManager)
void
setIndexer(SearchEngine indexer)
void
setTenantDao(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, setConfig, setLockManager, setReportRecipients, setSendActivityReport, setSender, setSize, setSystemLoadMonitor, setUserDao
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
setDocumentManager
public void setDocumentManager(DocumentManager documentManager)
-
setDocumentDao
public void setDocumentDao(DocumentDAO documentDao)
-
isIndeterminate
public boolean isIndeterminate()
Description copied from class:Task
Concrete 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:
isIndeterminate
in classTask
- Returns:
- true if the task is indeterminate
-
isConcurrent
public boolean isConcurrent()
Description copied from class:Task
Concrete implementations must override this method declaring if the task supports multiple instances running concurrently.- Specified by:
isConcurrent
in classTask
- Returns:
- true if the task is concurrent
-
prepareQuery
public static String[] prepareQuery()
Prepares the query to search the documents to be indexed- Returns:
- array composed by the query to execute and the sorting expression
-
setIndexer
public void setIndexer(SearchEngine indexer)
-
setTenantDao
public void setTenantDao(TenantDAO tenantDao)
-
killIndexerThreads
public static void killIndexerThreads()
Stops all the Indexer threads
-
-