public class ArtifactProducer extends Thread
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
int |
threadState
The thread state.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
ArtifactProducer(CPMEngine acpm)
Instantiates and initializes this instance.
|
ArtifactProducer(CPMEngine acpm,
CPECasPool aPool)
Construct instance of this class with a reference to the cpe engine and a pool of cas'es.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Null out fields of this object.
|
void |
fillQueue()
Fills the queue up to capacity.
|
long |
getCollectionReaderTotalFetchTime()
Returns total time spent when fetching entities from a CollectionReader.
|
String |
getLastDocId()
Gets the last doc id.
|
void |
invalidate(org.apache.uima.cas.CAS[] aCasList)
Invalidate.
|
boolean |
isRunning()
Checks if is running.
|
void |
run()
Runs this thread until the CPM halts or the CollectionReader has no more entities.
|
void |
setCollectionReader(org.apache.uima.collection.base_cpm.BaseCollectionReader aCollectionReader)
Assign CollectionReader to be used for reading.
|
void |
setCPMStatTable(Map aStatTable)
Add table that will contain statistics gathered while reading entities from a Collection This
table is used for non-uima reports.
|
void |
setNumEntitiesToProcess(long aNumToProcess)
Assign total number of entities to process.
|
void |
setProcessTrace(org.apache.uima.util.ProcessTrace aProcTrace)
Sets the process trace.
|
void |
setUimaTimer(org.apache.uima.util.UimaTimer aTimer)
Plug in Custom Timer to time events.
|
void |
setWorkQueue(BoundedWorkQueue aQueue)
Assigns a queue where the artifacts produced by this component will be deposited.
|
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 ArtifactProducer(CPMEngine acpm)
acpm - the acpmpublic ArtifactProducer(CPMEngine acpm, CPECasPool aPool)
acpm - -
reference to the cpeaPool - -
pool of casespublic boolean isRunning()
public void setUimaTimer(org.apache.uima.util.UimaTimer aTimer)
aTimer - -
custom timerpublic void setProcessTrace(org.apache.uima.util.ProcessTrace aProcTrace)
aProcTrace - the new process tracepublic long getCollectionReaderTotalFetchTime()
public void cleanup()
public void setNumEntitiesToProcess(long aNumToProcess)
aNumToProcess - -
number of entities to read from the Collection Readerpublic void setCollectionReader(org.apache.uima.collection.base_cpm.BaseCollectionReader aCollectionReader)
aCollectionReader - -
collection reader as source of datapublic void setWorkQueue(BoundedWorkQueue aQueue)
aQueue - -
queue for the artifacts this class is producingpublic void setCPMStatTable(Map aStatTable)
aStatTable - the new CPM stat tablepublic void fillQueue()
throws Exception
Exception - the exceptionpublic void run()
public String getLastDocId()
public void invalidate(org.apache.uima.cas.CAS[] aCasList)
aCasList - the a cas listCopyright © 2006–2017 The Apache Software Foundation. All rights reserved.