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 booleanabortCPMOnError()abstract voidaddBytesIn(long aBytesIn)abstract voidaddBytesOut(long aBytesOut)abstract voidaddStat(String aStatName, Object aStat)abstract intgetAbortCount()abstract HashMapgetAllStats()abstract longgetBytesIn()abstract longgetBytesOut()abstract CasProcessorConfigurationgetCasProcessorConfiguration()abstract CasProcessorDeployergetDeployer()abstract intgetFilteredCount()abstract ObjectgetLastCas()abstract StringgetLastProcessedEntityId()abstract StringgetName()abstract ServiceProxyPoolgetPool()abstract longgetProcessed()abstract longgetRemaining()abstract intgetRestartCount()abstract intgetRetryCount()abstract ObjectgetStat(String aStatName)abstract longgetTotalTime()abstract voidincrementAbortCount(int aCount)abstract voidincrementCasProcessorErrors(Throwable aThrowable)abstract voidincrementFilteredCount(int aCount)abstract voidincrementRestartCount(int aCount)abstract voidincrementRetryCount(int aCount)abstract voidincrementStat(String aStatName, Integer aStat)abstract voidincrementTotalTime(long aTime)abstract booleanisEndOfBatch(CasProcessor aCasProcessor, int aProcessedSize)abstract booleanisPaused()abstract booleanisSingleFencedService()abstract voidlogAbortedCases(Object[] abortedCasList)abstract voidpause()abstract booleanprocessCas(Object[] aCas)abstract voidreleaseCasProcessor(CasProcessor aCasProcessor)abstract voidresetRestartCount()abstract voidresume()abstract voidsetCasProcessorDeployer(CasProcessorDeployer aDeployer)abstract voidsetLastCas(Object aCasObject)abstract voidsetLastProcessedEntityId(String entityId)abstract voidsetMetadata(ProcessingResourceMetaData aMetadata)abstract voidsetProcessed(long aProcessedCount)abstract voidsetRemaining(long aRemainingCount)abstract voidsetSingleFencedService(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:
ResourceProcessExceptionIOException
-
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()
-
-