public class BaseCPMImpl extends Object implements org.apache.uima.collection.base_cpm.BaseCPM, Runnable
| Modifier and Type | Field and Description |
|---|---|
CPMThreadGroup |
cpmThreadGroup
The cpm thread group.
|
| Constructor and Description |
|---|
BaseCPMImpl(Boolean mode,
String aDescriptor,
org.apache.uima.resource.ResourceManager aResourceManager)
Parses CPE descriptor.
|
BaseCPMImpl(org.apache.uima.collection.metadata.CpeDescription aDescriptor)
Instantiates and initializes CPE Factory with a given CPE Descriptor and defaults.
|
BaseCPMImpl(org.apache.uima.collection.metadata.CpeDescription aDescriptor,
org.apache.uima.resource.ResourceManager aResourceManager,
boolean aDefaultProcessTrace,
Properties aProps)
Instantiates and initializes CPE Factory responsible for creating individual components that
are part of the processing pipeline.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCasProcessor(org.apache.uima.collection.base_cpm.CasProcessor aCasProcessor) |
void |
addCasProcessor(org.apache.uima.collection.base_cpm.CasProcessor aCasProcessor,
int aIndex) |
void |
addStatusCallbackListener(org.apache.uima.collection.base_cpm.BaseStatusCallbackListener aListener) |
void |
asynchStop()
Asynch stop.
|
void |
buildEventTree(org.apache.uima.util.ProcessTraceEvent aEvent,
int aTotalTime)
Helper method to help build the CPM report.
|
void |
disableCasProcessor(String aCasProcessorName) |
void |
displayStats(org.apache.uima.util.ProcessTrace aProcessTrace,
int aNumDocsProcessed)
Helper method to display stats and totals.
|
void |
enableCasProcessor(String aCasProcessorName)
Enable cas processor.
|
void |
finalizeIt()
Called to cleanup CPE on shutdown.
|
org.apache.uima.collection.base_cpm.CasProcessor[] |
getCasProcessors() |
org.apache.uima.collection.base_cpm.BaseCollectionReader |
getCollectionReader()
Returns a Collection Reader for this CPE.
|
org.apache.uima.collection.metadata.CpeConfiguration |
getCPEConfig()
Returns
CPEConfig object holding current CPE configuration. |
String |
getDescriptor(List aList)
Returns a CPE descriptor as a String.
|
org.apache.uima.util.ProcessTrace |
getPerformanceReport()
Returns PerformanceReport for the CPM.
|
org.apache.uima.util.Progress[] |
getProgress()
Returns current CPE progress.
|
org.apache.uima.collection.base_cpm.SynchPoint |
getSynchPoint()
Returns a
SynchPoint object initialized by the Collection Reader if the Collection
Reader implements RecoverableCollectionReader. |
void |
init(boolean aDummyCasProcessor,
Properties aProps)
Instantiates and initializes a CPE.
|
boolean |
isPaused() |
boolean |
isPauseOnException() |
boolean |
isProcessing() |
boolean |
isSerialProcessingRequired() |
void |
kill()
Kills the CPM hard.
|
void |
pause() |
void |
process() |
void |
process(org.apache.uima.collection.base_cpm.BaseCollectionReader aCollectionReader)
Deprecated.
|
void |
process(org.apache.uima.collection.base_cpm.BaseCollectionReader aCollectionReader,
int aBatchSize)
Deprecated.
|
void |
removeCasProcessor(org.apache.uima.collection.base_cpm.CasProcessor aCasProcessor) |
void |
removeStatusCallbackListener(org.apache.uima.collection.base_cpm.BaseStatusCallbackListener aListener) |
void |
resume() |
void |
resume(boolean aRetryFailed) |
void |
run() |
void |
setCollectionReader(org.apache.uima.collection.base_cpm.BaseCollectionReader aCollectionReader)
Sets the Collection Reader for this CPE.
|
void |
setJediiReport(boolean aUseJediiReport)
Sets Jedii-style reporting resources and sets the global flag to indicate what report-style to
use at the end of processing.
|
void |
setPauseOnException(boolean aPause) |
void |
setPerformanceTuningSettings(Properties aPerformanceTuningSettings)
Plugs in custom perfomance tunning parameters.
|
void |
setProcessControllerAdapter(ProcessControllerAdapter aPca)
Plugs in a given
ProcessControllerAdapter. |
void |
setSerialProcessingRequired(boolean aRequired) |
void |
stop() |
public CPMThreadGroup cpmThreadGroup
public BaseCPMImpl(org.apache.uima.collection.metadata.CpeDescription aDescriptor)
throws Exception
aDescriptor - -
parsed CPE descriptorException - -public BaseCPMImpl(org.apache.uima.collection.metadata.CpeDescription aDescriptor,
org.apache.uima.resource.ResourceManager aResourceManager,
boolean aDefaultProcessTrace,
Properties aProps)
throws Exception
aDescriptor - -
parsed CPE descriptoraResourceManager - -
ResourceManager instance to be used by the CPEaDefaultProcessTrace - -
ProcessTrace instance to capture events and statsaProps - the a propsException - -public BaseCPMImpl(Boolean mode, String aDescriptor, org.apache.uima.resource.ResourceManager aResourceManager) throws Exception
mode - -
indicates if the CPM should use a static descriptor or one providedaDescriptor - -
provided descriptor pathaResourceManager - ResourceManager to be used by CPMException - -public void setPerformanceTuningSettings(Properties aPerformanceTuningSettings)
aPerformanceTuningSettings - the new performance tuning settingspublic void setProcessControllerAdapter(ProcessControllerAdapter aPca)
ProcessControllerAdapter. The CPM uses this adapter to request Cas
Processor restarts and shutdown.aPca - -
instance of the ProcessControllerAdapterpublic void setJediiReport(boolean aUseJediiReport)
aUseJediiReport - the new jedii reportpublic void init(boolean aDummyCasProcessor,
Properties aProps)
throws Exception
aDummyCasProcessor - -aProps - the a propsException - -public org.apache.uima.collection.metadata.CpeConfiguration getCPEConfig()
throws Exception
CPEConfig object holding current CPE configuration.Exception - -public org.apache.uima.collection.base_cpm.CasProcessor[] getCasProcessors()
getCasProcessors in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void addCasProcessor(org.apache.uima.collection.base_cpm.CasProcessor aCasProcessor)
throws org.apache.uima.resource.ResourceConfigurationException
addCasProcessor in interface org.apache.uima.collection.base_cpm.BaseCPMorg.apache.uima.resource.ResourceConfigurationExceptionpublic void addCasProcessor(org.apache.uima.collection.base_cpm.CasProcessor aCasProcessor,
int aIndex)
throws org.apache.uima.resource.ResourceConfigurationException
addCasProcessor in interface org.apache.uima.collection.base_cpm.BaseCPMorg.apache.uima.resource.ResourceConfigurationExceptionpublic void removeCasProcessor(org.apache.uima.collection.base_cpm.CasProcessor aCasProcessor)
removeCasProcessor in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void disableCasProcessor(String aCasProcessorName)
disableCasProcessor in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void enableCasProcessor(String aCasProcessorName)
aCasProcessorName - the a cas processor namepublic boolean isSerialProcessingRequired()
isSerialProcessingRequired in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void setSerialProcessingRequired(boolean aRequired)
setSerialProcessingRequired in interface org.apache.uima.collection.base_cpm.BaseCPMpublic boolean isPauseOnException()
isPauseOnException in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void setPauseOnException(boolean aPause)
setPauseOnException in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void addStatusCallbackListener(org.apache.uima.collection.base_cpm.BaseStatusCallbackListener aListener)
addStatusCallbackListener in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void removeStatusCallbackListener(org.apache.uima.collection.base_cpm.BaseStatusCallbackListener aListener)
removeStatusCallbackListener in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void finalizeIt()
@Deprecated public void process(org.apache.uima.collection.base_cpm.BaseCollectionReader aCollectionReader) throws org.apache.uima.resource.ResourceInitializationException
aCollectionReader - the a collection readerorg.apache.uima.resource.ResourceInitializationException - the resource initialization exceptionBaseCPM.process()public void process()
throws org.apache.uima.resource.ResourceInitializationException
process in interface org.apache.uima.collection.base_cpm.BaseCPMorg.apache.uima.resource.ResourceInitializationException@Deprecated public void process(org.apache.uima.collection.base_cpm.BaseCollectionReader aCollectionReader, int aBatchSize) throws org.apache.uima.resource.ResourceInitializationException
aCollectionReader - the a collection readeraBatchSize - the a batch sizeorg.apache.uima.resource.ResourceInitializationException - the resource initialization exceptionBaseCPM.process()public void setCollectionReader(org.apache.uima.collection.base_cpm.BaseCollectionReader aCollectionReader)
setCollectionReader in interface org.apache.uima.collection.base_cpm.BaseCPMaCollectionReader - the collection readerpublic org.apache.uima.collection.base_cpm.BaseCollectionReader getCollectionReader()
getCollectionReader in interface org.apache.uima.collection.base_cpm.BaseCPMpublic boolean isProcessing()
isProcessing in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void pause()
pause in interface org.apache.uima.collection.base_cpm.BaseCPMpublic boolean isPaused()
isPaused in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void resume(boolean aRetryFailed)
resume in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void resume()
resume in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void kill()
public void stop()
stop in interface org.apache.uima.collection.base_cpm.BaseCPMpublic void asynchStop()
public void displayStats(org.apache.uima.util.ProcessTrace aProcessTrace,
int aNumDocsProcessed)
aProcessTrace - -
trace containing statsaNumDocsProcessed - -
number of entities processed so farpublic void buildEventTree(org.apache.uima.util.ProcessTraceEvent aEvent,
int aTotalTime)
aEvent - the a eventaTotalTime - the a total timepublic org.apache.uima.util.ProcessTrace getPerformanceReport()
getPerformanceReport in interface org.apache.uima.collection.base_cpm.BaseCPMpublic org.apache.uima.util.Progress[] getProgress()
getProgress in interface org.apache.uima.collection.base_cpm.BaseCPMpublic String getDescriptor(List aList) throws org.apache.uima.resource.ResourceConfigurationException
aList - -
list of componentsorg.apache.uima.resource.ResourceConfigurationException - the resource configuration exceptionpublic org.apache.uima.collection.base_cpm.SynchPoint getSynchPoint()
SynchPoint object initialized by the Collection Reader if the Collection
Reader implements RecoverableCollectionReader. The synchpoint object contains the
current snapshot that includes the last document processed.Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.