public class CmsIndexingThreadManager extends java.lang.Object
|Constructor and Description|
Creates and starts a thread manager for indexing threads.
|Modifier and Type||Method and Description|
Creates and starts a new indexing thread for a resource.
Returns if the indexing manager still have indexing threads.
Writes statistical information to the report.
public CmsIndexingThreadManager(long timeout, int maxModificationsBeforeCommit)
timeout- timeout after a thread is abandoned
maxModificationsBeforeCommit- the maximum number of modifications before a commit in the search index is triggered
public void createIndexingThread(CmsVfsIndexer indexer, I_CmsIndexWriter writer, CmsResource res)
After an indexing thread was started, the manager suspends itself
and waits for an amount of time specified by the
value. If the timeout value is reached, the indexing thread is
aborted by an interrupt signal.
indexer- the VFS indexer to create the index thread for
writer- the index writer that can update the index
res- the resource
public boolean isRunning()
public void reportStatistics(I_CmsReport report)
The method reports the total number of threads started (equals to the number of indexed files), the number of returned threads (equals to the number of successfully indexed files), and the number of abandoned threads (hanging threads reaching the timeout).
report- the report to write the statistics to