public class CmsIndexingThread
extends java.lang.Thread
The indexing of a single resource is wrapped into a thread in order to prevent the overall indexer from hanging.
| 构造器和说明 |
|---|
CmsIndexingThread(CmsObject cms,
CmsResource res,
CmsSearchIndex index,
int count,
I_CmsReport report)
Create a new indexing thread.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected I_CmsSearchDocument |
createIndexDocument(CmsObject cms,
CmsResource res,
CmsSearchIndex index,
int count,
I_CmsReport report)
Creates the search index document.
|
I_CmsSearchDocument |
getResult()
Returns the document created by this indexer thread.
|
void |
run()
Starts the thread to index a single resource.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic CmsIndexingThread(CmsObject cms, CmsResource res, CmsSearchIndex index, int count, I_CmsReport report)
cms - the current OpenCms user contextres - the resource to indexindex - the index to update the resource incount - the report countreport - the report to write the output topublic I_CmsSearchDocument getResult()
In case the resource could not be indexed, null is returned.
public void run()
run 在接口中 java.lang.Runnablerun 在类中 java.lang.ThreadRunnable.run()protected I_CmsSearchDocument createIndexDocument(CmsObject cms, CmsResource res, CmsSearchIndex index, int count, I_CmsReport report) throws CmsException
cms - the current OpenCms user contextres - the resource to indexindex - the index to update the resource incount - the report countreport - the report to write the output toCmsException - in case of issues while creating the search index document