org.silverpeas.search.indexEngine.model
Class IndexerThread
java.lang.Object
java.lang.Thread
org.silverpeas.search.indexEngine.model.IndexerThread
- All Implemented Interfaces:
- Runnable
public class IndexerThread
- extends Thread
A thread IndexerThread index in the background a batch of index requests. All the public methods
are static, so only one thread runs and processes the requests.
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 |
start
public static void start(IndexManager indexManager)
- Builds and starts the thread which will process all the requests. This method is synchonized on
the requests queue in order to guarantee that only one IndexerThread is running.
- Parameters:
indexManager
-
addIndexEntry
public static void addIndexEntry(FullIndexEntry indexEntry)
- Add a request 'add entry index'
- Parameters:
indexEntry
-
removeIndexEntry
public static void removeIndexEntry(IndexEntryPK indexEntry)
- Add a request 'remove entry index'
run
public void run()
- Process all the requests. When the queue is empty : sends an optimize query to the
indexManager. This method should be private but is already declared public in the base class
Thread.
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
Copyright © 2016 Silverpeas. All Rights Reserved.