public class StufferThread
extends java.lang.Thread
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
protected BlockingDocuments |
blockingDocuments
Blocking documents object.
|
protected DocumentQueue |
documentQueue
This is a reference to the static main document queue
|
protected int |
lowestStuffAmt
This is the lowest number of entries we want ot stuff at any one time
|
protected int |
lowWaterMark
This is the low water mark for attempting to restuff
|
protected java.lang.String |
processID
Process ID
|
protected QueueTracker |
queueTracker
This is the queue tracker object.
|
protected WorkerResetManager |
resetManager
Worker thread pool reset manager
|
protected int |
stuffAmt
This is the number of entries we want to stuff at any one time.
|
protected static java.lang.String |
stufferThreadLastTimeDatumName
Datum which contains the last time, in milliseconds since epoch, that any stuffer thread in the cluster
successfully fired.
|
protected static java.lang.String |
stufferThreadLockName
Write lock which allows us to keep track of the last time ANY stuffer thread stuffed data
|
Constructor and Description |
---|
StufferThread(DocumentQueue documentQueue,
int n,
WorkerResetManager resetManager,
QueueTracker qt,
BlockingDocuments blockingDocuments,
float lowWaterFactor,
float stuffSizeFactor,
java.lang.String processID)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected static long |
readLastTime(ILockManager lockManager) |
void |
run() |
protected static void |
writeLastTime(ILockManager lockManager,
long lastTime) |
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
public static final java.lang.String _rcsid
protected static final java.lang.String stufferThreadLockName
protected static final java.lang.String stufferThreadLastTimeDatumName
protected final DocumentQueue documentQueue
protected final WorkerResetManager resetManager
protected final int lowestStuffAmt
protected int stuffAmt
protected final int lowWaterMark
protected final QueueTracker queueTracker
protected final BlockingDocuments blockingDocuments
protected final java.lang.String processID
public StufferThread(DocumentQueue documentQueue, int n, WorkerResetManager resetManager, QueueTracker qt, BlockingDocuments blockingDocuments, float lowWaterFactor, float stuffSizeFactor, java.lang.String processID) throws ManifoldCFException
documentQueue
- is the document queue we'll be stuffing.n
- represents the number of threads that will be processing queued stuff, NOT the
number of documents to be done at once!ManifoldCFException
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected static long readLastTime(ILockManager lockManager) throws ManifoldCFException
ManifoldCFException
protected static void writeLastTime(ILockManager lockManager, long lastTime) throws ManifoldCFException
ManifoldCFException