|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.opencms.search.CmsIndexingThread
public class CmsIndexingThread
Implements the indexing method for a single resource as thread.
The indexing of a single resource is wrapped into a thread in order to prevent the overall indexer from hanging.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
CmsIndexingThread(CmsObject cms,
CmsResource res,
CmsSearchIndex index,
int count,
I_CmsReport report)
Create a new indexing thread. |
Method Summary | |
---|---|
protected org.apache.lucene.document.Document |
createIndexDocument(CmsObject cms,
CmsResource res,
CmsSearchIndex index,
int count,
I_CmsReport report)
Creates the search index document. |
org.apache.lucene.document.Document |
getResult()
Returns the document created by this indexer thread. |
void |
run()
Starts the thread to index a single resource. |
Methods inherited from class java.lang.Thread |
---|
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, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public 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 toMethod Detail |
---|
public org.apache.lucene.document.Document getResult()
In case the resource could not be indexed, null
is returned.
public void run()
run
in interface Runnable
run
in class Thread
Runnable.run()
protected org.apache.lucene.document.Document 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 to
CmsException
- in case of issues while creating the search index document
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |