public class WorkerThread
extends java.lang.Thread
Modifier and Type | Class and Description |
---|---|
protected static class |
WorkerThread.CheckActivity
The check activity class
|
protected static class |
WorkerThread.DocumentBin
DocumentBin class
|
protected static class |
WorkerThread.DocumentReference
Class describing document reference.
|
protected static class |
WorkerThread.DocumentToProcess
Class that represents a decision to process a document.
|
protected static class |
WorkerThread.ExistingVersions
The implementation of the IExistingVersions interface.
|
protected static class |
WorkerThread.OutputActivity
The ingest logger class
|
protected static class |
WorkerThread.ProcessActivity
Process activity class wraps access to the ingester and job queue.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
protected DocumentQueue |
documentQueue
This is a reference to the static main document queue
|
protected java.lang.String |
id
Thread id
|
protected static int |
MAX_ADDS_IN_TRANSACTION
The maximum number of adds that happen in a single transaction
|
protected java.lang.String |
processID
Process ID
|
protected QueueTracker |
queueTracker
Queue tracker
|
protected WorkerResetManager |
resetManager
Worker thread pool reset manager
|
Constructor and Description |
---|
WorkerThread(java.lang.String id,
DocumentQueue documentQueue,
WorkerResetManager resetManager,
QueueTracker queueTracker,
java.lang.String processID)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected static boolean |
compareArrays(java.lang.String[] array1,
java.lang.String[] array2)
Compare two sorted collection names lists.
|
protected static java.lang.String |
computeComponentIDHash(java.lang.String componentIdentifier) |
protected static java.lang.String |
makeListString(DocumentDescription[] sourceList) |
protected static java.lang.String |
makeListString(java.util.List<QueuedDocument> sourceList) |
protected static void |
moveList(java.util.List<QueuedDocument> sourceList,
java.util.List<QueuedDocument> targetList) |
protected static void |
processDeleteLists(IPipelineConnections pipelineConnections,
IRepositoryConnector connector,
IRepositoryConnection connection,
IJobManager jobManager,
java.util.List<QueuedDocument> deleteList,
IIncrementalIngester ingester,
java.lang.Long jobID,
java.lang.String[] legalLinkTypes,
WorkerThread.OutputActivity ingestLogger,
int hopcountMethod,
IReprioritizationTracker rt,
long currentTime)
Clear specified documents out of the job queue and from the appliance.
|
protected static void |
processHopcountRemovalLists(IPipelineConnections pipelineConnections,
IRepositoryConnector connector,
IRepositoryConnection connection,
IJobManager jobManager,
java.util.List<QueuedDocument> hopcountremoveList,
IIncrementalIngester ingester,
java.lang.Long jobID,
java.lang.String[] legalLinkTypes,
WorkerThread.OutputActivity ingestLogger,
int hopcountMethod,
IReprioritizationTracker rt,
long currentTime)
Mark specified documents as 'hopcount removed', and remove them from the
index.
|
protected static void |
processJobQueueDeletions(java.util.List<QueuedDocument> jobmanagerDeleteList,
IRepositoryConnector connector,
IRepositoryConnection connection,
IJobManager jobManager,
java.lang.Long jobID,
java.lang.String[] legalLinkTypes,
int hopcountMethod,
IReprioritizationTracker rt,
long currentTime)
Process job queue deletions.
|
protected static void |
processJobQueueHopcountRemovals(java.util.List<QueuedDocument> jobmanagerRemovalList,
IRepositoryConnector connector,
IRepositoryConnection connection,
IJobManager jobManager,
java.lang.Long jobID,
java.lang.String[] legalLinkTypes,
int hopcountMethod,
IReprioritizationTracker rt,
long currentTime)
Process job queue hopcount removals.
|
protected static java.util.List<QueuedDocument> |
removeFromIndex(IPipelineConnections pipelineConnections,
java.lang.String connectionName,
IJobManager jobManager,
java.util.List<QueuedDocument> deleteList,
IIncrementalIngester ingester,
WorkerThread.OutputActivity ingestLogger)
Remove a specified set of documents from the index.
|
protected static void |
requeueDocuments(IJobManager jobManager,
java.util.List<QueuedDocument> requeueList,
long retryTime,
long failTime,
int failCount)
Requeue documents after a service interruption was detected.
|
void |
run() |
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 final java.lang.String id
protected final DocumentQueue documentQueue
protected final WorkerResetManager resetManager
protected final QueueTracker queueTracker
protected final java.lang.String processID
protected static final int MAX_ADDS_IN_TRANSACTION
public WorkerThread(java.lang.String id, DocumentQueue documentQueue, WorkerResetManager resetManager, QueueTracker queueTracker, java.lang.String processID) throws ManifoldCFException
id
- is the worker thread id.ManifoldCFException
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected static boolean compareArrays(java.lang.String[] array1, java.lang.String[] array2)
protected static java.lang.String makeListString(java.util.List<QueuedDocument> sourceList)
protected static java.lang.String makeListString(DocumentDescription[] sourceList)
protected static void moveList(java.util.List<QueuedDocument> sourceList, java.util.List<QueuedDocument> targetList)
protected static void processHopcountRemovalLists(IPipelineConnections pipelineConnections, IRepositoryConnector connector, IRepositoryConnection connection, IJobManager jobManager, java.util.List<QueuedDocument> hopcountremoveList, IIncrementalIngester ingester, java.lang.Long jobID, java.lang.String[] legalLinkTypes, WorkerThread.OutputActivity ingestLogger, int hopcountMethod, IReprioritizationTracker rt, long currentTime) throws ManifoldCFException
ManifoldCFException
protected static void processDeleteLists(IPipelineConnections pipelineConnections, IRepositoryConnector connector, IRepositoryConnection connection, IJobManager jobManager, java.util.List<QueuedDocument> deleteList, IIncrementalIngester ingester, java.lang.Long jobID, java.lang.String[] legalLinkTypes, WorkerThread.OutputActivity ingestLogger, int hopcountMethod, IReprioritizationTracker rt, long currentTime) throws ManifoldCFException
pipelineConnections
- is the basic pipeline specification for this job.jobManager
- is the job manager.deleteList
- is a list of QueuedDocument objects to clean out.ingester
- is the handle to the incremental ingestion API control object.ManifoldCFException
protected static java.util.List<QueuedDocument> removeFromIndex(IPipelineConnections pipelineConnections, java.lang.String connectionName, IJobManager jobManager, java.util.List<QueuedDocument> deleteList, IIncrementalIngester ingester, WorkerThread.OutputActivity ingestLogger) throws ManifoldCFException
ManifoldCFException
protected static void processJobQueueDeletions(java.util.List<QueuedDocument> jobmanagerDeleteList, IRepositoryConnector connector, IRepositoryConnection connection, IJobManager jobManager, java.lang.Long jobID, java.lang.String[] legalLinkTypes, int hopcountMethod, IReprioritizationTracker rt, long currentTime) throws ManifoldCFException
ManifoldCFException
protected static void processJobQueueHopcountRemovals(java.util.List<QueuedDocument> jobmanagerRemovalList, IRepositoryConnector connector, IRepositoryConnection connection, IJobManager jobManager, java.lang.Long jobID, java.lang.String[] legalLinkTypes, int hopcountMethod, IReprioritizationTracker rt, long currentTime) throws ManifoldCFException
ManifoldCFException
protected static void requeueDocuments(IJobManager jobManager, java.util.List<QueuedDocument> requeueList, long retryTime, long failTime, int failCount) throws ManifoldCFException
jobManager
- is the job manager object.requeueList
- is a list of QueuedDocument objects describing what needs to be requeued.retryTime
- is the time that the first retry ought to be scheduled for.failTime
- is the time beyond which retries lead to hard failure.failCount
- is the number of retries allowed until hard failure.ManifoldCFException
protected static java.lang.String computeComponentIDHash(java.lang.String componentIdentifier) throws ManifoldCFException
ManifoldCFException