Class ProcessingContainer
- java.lang.Object
-
- org.apache.uima.resource.Resource_ImplBase
-
- org.apache.uima.collection.impl.base_cpm.container.ProcessingContainer
-
- All Implemented Interfaces:
CasProcessorController
,ConfigurableResource
,Resource
- Direct Known Subclasses:
ProcessingContainer_Impl
public abstract class ProcessingContainer extends Resource_ImplBase implements ConfigurableResource, CasProcessorController
Base interface for implementing a Container object responsible for managing Cas Processor instances at runtime. Aggregates stats and totals and helps with error recovery.
-
-
Field Summary
-
Fields inherited from interface org.apache.uima.collection.impl.base_cpm.container.CasProcessorController
DISABLED, INITIALIZED, KILLED, NOTINITIALIZED, RUNNING
-
Fields inherited from interface org.apache.uima.resource.Resource
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT
-
-
Constructor Summary
Constructors Constructor Description ProcessingContainer()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract boolean
abortCPMOnError()
abstract void
addBytesIn(long aBytesIn)
abstract void
addBytesOut(long aBytesOut)
abstract void
addStat(String aStatName, Object aStat)
abstract int
getAbortCount()
abstract HashMap
getAllStats()
abstract long
getBytesIn()
abstract long
getBytesOut()
abstract CasProcessorConfiguration
getCasProcessorConfiguration()
abstract CasProcessorDeployer
getDeployer()
abstract int
getFilteredCount()
abstract Object
getLastCas()
abstract String
getLastProcessedEntityId()
abstract String
getName()
abstract ServiceProxyPool
getPool()
abstract long
getProcessed()
abstract long
getRemaining()
abstract int
getRestartCount()
abstract int
getRetryCount()
abstract Object
getStat(String aStatName)
abstract long
getTotalTime()
abstract void
incrementAbortCount(int aCount)
abstract void
incrementCasProcessorErrors(Throwable aThrowable)
abstract void
incrementFilteredCount(int aCount)
abstract void
incrementRestartCount(int aCount)
abstract void
incrementRetryCount(int aCount)
abstract void
incrementStat(String aStatName, Integer aStat)
abstract void
incrementTotalTime(long aTime)
abstract boolean
isEndOfBatch(CasProcessor aCasProcessor, int aProcessedSize)
abstract boolean
isPaused()
abstract boolean
isSingleFencedService()
abstract void
logAbortedCases(Object[] abortedCasList)
abstract void
pause()
abstract boolean
processCas(Object[] aCas)
abstract void
releaseCasProcessor(CasProcessor aCasProcessor)
abstract void
resetRestartCount()
abstract void
resume()
abstract void
setCasProcessorDeployer(CasProcessorDeployer aDeployer)
abstract void
setLastCas(Object aCasObject)
abstract void
setLastProcessedEntityId(String entityId)
abstract void
setMetadata(ProcessingResourceMetaData aMetadata)
abstract void
setProcessed(long aProcessedCount)
abstract void
setRemaining(long aRemainingCount)
abstract void
setSingleFencedService(boolean aSingleFencedInstance)
-
Methods inherited from class org.apache.uima.resource.Resource_ImplBase
destroy, getCasManager, getLogger, getMetaData, getRelativePathResolver, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger, setMetaData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.uima.collection.impl.base_cpm.container.CasProcessorController
getCasProcessor, getStatus, isAbortable, isIntegrated, isLocal, isRemote, setStatus
-
Methods inherited from interface org.apache.uima.resource.ConfigurableResource
getConfigParameterValue, getConfigParameterValue, reconfigure, setConfigParameterValue, setConfigParameterValue
-
Methods inherited from interface org.apache.uima.resource.Resource
destroy, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger
-
-
-
-
Method Detail
-
processCas
public abstract boolean processCas(Object[] aCas)
-
releaseCasProcessor
public abstract void releaseCasProcessor(CasProcessor aCasProcessor)
-
getName
public abstract String getName()
-
isEndOfBatch
public abstract boolean isEndOfBatch(CasProcessor aCasProcessor, int aProcessedSize) throws ResourceProcessException, IOException
- Throws:
ResourceProcessException
IOException
-
abortCPMOnError
public abstract boolean abortCPMOnError()
-
incrementCasProcessorErrors
public abstract void incrementCasProcessorErrors(Throwable aThrowable) throws Exception
- Throws:
Exception
-
getCasProcessorConfiguration
public abstract CasProcessorConfiguration getCasProcessorConfiguration()
-
getProcessed
public abstract long getProcessed()
-
setProcessed
public abstract void setProcessed(long aProcessedCount)
-
getBytesIn
public abstract long getBytesIn()
-
addBytesIn
public abstract void addBytesIn(long aBytesIn)
-
getBytesOut
public abstract long getBytesOut()
-
addBytesOut
public abstract void addBytesOut(long aBytesOut)
-
incrementRestartCount
public abstract void incrementRestartCount(int aCount)
-
getRestartCount
public abstract int getRestartCount()
-
incrementRetryCount
public abstract void incrementRetryCount(int aCount)
-
getRetryCount
public abstract int getRetryCount()
-
incrementAbortCount
public abstract void incrementAbortCount(int aCount)
-
getAbortCount
public abstract int getAbortCount()
-
incrementFilteredCount
public abstract void incrementFilteredCount(int aCount)
-
getFilteredCount
public abstract int getFilteredCount()
-
getRemaining
public abstract long getRemaining()
-
setRemaining
public abstract void setRemaining(long aRemainingCount)
-
setLastProcessedEntityId
public abstract void setLastProcessedEntityId(String entityId)
-
getLastProcessedEntityId
public abstract String getLastProcessedEntityId()
-
incrementTotalTime
public abstract void incrementTotalTime(long aTime)
-
getTotalTime
public abstract long getTotalTime()
-
logAbortedCases
public abstract void logAbortedCases(Object[] abortedCasList)
-
setLastCas
public abstract void setLastCas(Object aCasObject)
-
getLastCas
public abstract Object getLastCas()
-
setCasProcessorDeployer
public abstract void setCasProcessorDeployer(CasProcessorDeployer aDeployer)
-
getDeployer
public abstract CasProcessorDeployer getDeployer()
-
setMetadata
public abstract void setMetadata(ProcessingResourceMetaData aMetadata)
-
getAllStats
public abstract HashMap getAllStats()
-
resetRestartCount
public abstract void resetRestartCount()
-
pause
public abstract void pause()
-
resume
public abstract void resume()
-
isPaused
public abstract boolean isPaused()
-
getPool
public abstract ServiceProxyPool getPool()
-
setSingleFencedService
public abstract void setSingleFencedService(boolean aSingleFencedInstance)
-
isSingleFencedService
public abstract boolean isSingleFencedService()
-
-