Interface CpeCasProcessor
-
- All Superinterfaces:
java.lang.Cloneable,MetaDataObject,java.io.Serializable,XMLizable
- All Known Subinterfaces:
CpeIntegratedCasProcessor,CpeLocalCasProcessor,CpeRemoteCasProcessor
- All Known Implementing Classes:
CasProcessorCpeObject,CpeIntegratedCasProcessorImpl,CpeLocalCasProcessorImpl,CpeRemoteCasProcessorImpl
public interface CpeCasProcessor extends MetaDataObject
An object that holds configuration that is part of the CPE descriptor. It provides the means of configuring behavior that is common to all CasProcessor types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddDeployParam(java.lang.String aParamName, java.lang.String aParamValue)Adds deployment parameter used by the CPE when launching CasProcessorjava.lang.StringgetActionOnMaxError()Returns strategy for dealing with exceeding error thresholds.java.lang.StringgetActionOnMaxRestart()Returns strategy for dealing with exceeding error thresholds.intgetBatchSize()Returns CasProcessor batch sizejava.lang.StringgetCasProcessorFilter()Returns CasProcessor filter expression.CpeCheckpointgetCheckpoint()ReturnsCpeCheckpointobject containing checkpoint configuration ( checkpoint file, frequency of checkpoints )CasProcessorConfigurationParameterSettingsgetConfigurationParameterSettings()ReturnsCasProcessorConfigurationParameterSettingsobject containing overrides to parameter settings for this CAS Processor.CpeComponentDescriptorgetCpeComponentDescriptor()Returns theCpeComponentDescriptorinstance associated with this Cas Processor.java.lang.StringgetDeployment()Returns CasProcessor deployment type.CasProcessorDeploymentParamsgetDeploymentParams()ReturnsCasProcessorDeploymentParamsobject containing deployment parameters used for launching CasProcessor.java.lang.StringgetDescriptor()Deprecated.Doesn't support the new import syntax.CasProcessorErrorHandlinggetErrorHandling()ReturnsCasProcessorErrorHandlingobject containing strategies to deal with errors that may occur during processing.booleangetIsParallelizable()intgetMaxErrorCount()Returns the max number of errors tolerated by the CPE.intgetMaxErrorSampleSize()Returns sample size.intgetMaxRestartCount()Returns max restarts threshold fro CasProcessorjava.lang.StringgetName()Returns CasProcessor's nameCasProcessorRunInSeperateProcessgetRunInSeparateProcess()java.lang.StringgetSOFA()CpeSofaMappingsgetSofaNameMappings()intgetTimeout()Returns the timeout value.voidsetActionOnMaxError(java.lang.String aAction)Sets a strategy for dealing with exceeding error thresholds.voidsetActionOnMaxRestart(java.lang.String aAction)Sets strategy for dealing with exceeding error thresholds.voidsetBatchSize(int aBatchSize)Sets CasProcessor's batch size.voidsetCasProcessorFilter(java.lang.String aFilterExpression)Sets CasProcessor filter expression used by the CPE to route CASs.voidsetConfigurationParameterSettings(CasProcessorConfigurationParameterSettings aSettings)Sets theCasProcessorConfigurationParameterSettingsobject containing overrides to parameter settings for this CAS Processor.voidsetCpeComponentDescriptor(CpeComponentDescriptor aDescriptor)Sets theCpeComponentDescriptorinstance associated with this Cas Processor.voidsetDescriptor(java.lang.String aDescriptor)Deprecated.Doesn't support the new import syntax.voidsetIsParallelizable(boolean isP)voidsetMaxErrorCount(int aErrorCount)Sets the max number of errors tolerated by the CPE.voidsetMaxErrorSampleSize(int aErrorSampleSize)Sets the sample size.voidsetMaxRestartCount(int aErrorCount)Sets max tolerated restarts threshold for CasProcessorvoidsetName(java.lang.String aName)Sets CasProcessor's namevoidsetSOFA(java.lang.String aSOFA)voidsetSofaNameMappings(CpeSofaMappings mappings)voidsetTimeout(int aTimeoutValue)Sets the timeout value.-
Methods inherited from interface org.apache.uima.resource.metadata.MetaDataObject
clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl
-
Methods inherited from interface org.apache.uima.util.XMLizable
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML
-
-
-
-
Method Detail
-
setName
void setName(java.lang.String aName) throws CpeDescriptorExceptionSets CasProcessor's name- Parameters:
aName- - CasProcessor name- Throws:
CpeDescriptorException- tbd
-
getName
java.lang.String getName()
Returns CasProcessor's name- Returns:
- - name
-
setSOFA
void setSOFA(java.lang.String aSOFA) throws CpeDescriptorException- Throws:
CpeDescriptorException
-
getSOFA
java.lang.String getSOFA()
-
setDescriptor
@Deprecated void setDescriptor(java.lang.String aDescriptor) throws CpeDescriptorExceptionDeprecated.Doesn't support the new import syntax. Use setCpeComponentDescriptor() instead.Sets CasProcessor descriptor path.- Parameters:
aDescriptor- - descriptor path- Throws:
CpeDescriptorException- tbd
-
getDescriptor
@Deprecated java.lang.String getDescriptor()
Deprecated.Doesn't support the new import syntax. Use getCpeComponentDescriptor().findAbsoluteUrl() instead.Returns CasProcessor descriptor.- Returns:
- descriptor
-
getCpeComponentDescriptor
CpeComponentDescriptor getCpeComponentDescriptor()
Returns theCpeComponentDescriptorinstance associated with this Cas Processor. That object contains a path to the component descriptor.- Returns:
CpeComponentDescriptorinstance
-
setCpeComponentDescriptor
void setCpeComponentDescriptor(CpeComponentDescriptor aDescriptor) throws CpeDescriptorException
Sets theCpeComponentDescriptorinstance associated with this Cas Processor. That object contains a path to the component descriptor.- Parameters:
aDescriptor-CpeComponentDescriptorinstance- Throws:
CpeDescriptorException- tbd
-
getDeployment
java.lang.String getDeployment()
Returns CasProcessor deployment type. Three types are currently supported:- integrated
- remote
- local
- Returns:
- - deployment mode
-
setCasProcessorFilter
void setCasProcessorFilter(java.lang.String aFilterExpression) throws CpeDescriptorExceptionSets CasProcessor filter expression used by the CPE to route CASs. A CasProcessor can be configured in the CPE Descriptor to use filtering using an SQL-like WHERE clause: where featurespec [ and featurespec2 ...]. The featurespec can be one of these four forms and meanings:- Feature Process CAS if the Feature is present (e.g. where Person)
- Feature! Process CAS if the Feature is not present (e.g. where Person!)
- Feature=value Process CAS if the Feature has this value( e.g. where Person=Bush)
- Feature!=value Process CAS if the Feature does not have this value (e.g. where Person!=Bush)
- Parameters:
aFilterExpression- - filter- Throws:
CpeDescriptorException- tbd
-
getCasProcessorFilter
java.lang.String getCasProcessorFilter()
Returns CasProcessor filter expression. A CasProcessor can be configured in the CPE Descriptor to use filtering using an SQL-like WHERE clause: where featurespec [ and featurespec2 ...]. The featurespec can be one of these four forms and meanings:- Feature Process CAS if the Feature is present (e.g. where Person)
- Feature! Process CAS if the Feature is not present (e.g. where Person!)
- Feature=value Process CAS if the Feature has this value( e.g. where Person=Bush)
- Feature!=value Process CAS if the Feature does not have this value (e.g. where Person!=Bush)
- Returns:
- - filter expression
-
setBatchSize
void setBatchSize(int aBatchSize)
Sets CasProcessor's batch size.- Parameters:
aBatchSize- - size of CasProcessor batch
-
getBatchSize
int getBatchSize()
Returns CasProcessor batch size- Returns:
- - batch size
-
getErrorHandling
CasProcessorErrorHandling getErrorHandling()
ReturnsCasProcessorErrorHandlingobject containing strategies to deal with errors that may occur during processing. This object provides the means of modifying error thresholds and actions to take when error thresholds are exceeded.- Returns:
CasProcessorErrorHandling
-
getCheckpoint
CpeCheckpoint getCheckpoint()
ReturnsCpeCheckpointobject containing checkpoint configuration ( checkpoint file, frequency of checkpoints )- Returns:
CasProcessorErrorHandling
-
getDeploymentParams
CasProcessorDeploymentParams getDeploymentParams()
ReturnsCasProcessorDeploymentParamsobject containing deployment parameters used for launching CasProcessor. This object provides the means of adding, getting, and removingCasProcessorDeploymentParamobjects.- Returns:
- - object containing list of
CasProcessorDeploymentParam
-
setMaxErrorCount
void setMaxErrorCount(int aErrorCount)
Sets the max number of errors tolerated by the CPE. If the the threshold is exceeded the CPE will take an action based on defined strategy. Max Error is defined in terms of a quotient, like 3/1000. Where 3 is the actual max error tolerance and 1000 is a sample size. So the above is interpreted as 3 errors per thousand entities processed.- Parameters:
aErrorCount- - max error threshold
-
getMaxErrorCount
int getMaxErrorCount()
Returns the max number of errors tolerated by the CPE. If the the threshold is exceeded the CPE will take an action based on defined strategy. Max Error is defined in terms of a quotient, like 3/1000. Where 3 is the actual max error tolerance and 1000 is a sample size. So the above is interpreted as 3 errors per thousand entities processed.- Returns:
- - max error threshold
-
setMaxErrorSampleSize
void setMaxErrorSampleSize(int aErrorSampleSize)
Sets the sample size. Max Error is defined in terms of a quotient, like 3/1000. Where 3 is the actual max error tolerance and 1000 is a sample size. So the above is interpreted as 3 errors per thousand entities processed.- Parameters:
aErrorSampleSize- the sample size
-
getMaxErrorSampleSize
int getMaxErrorSampleSize()
Returns sample size. Max Error is defined in terms of a quotient, like 3/1000. Where 3 is the actual max error tolerance and 1000 is a sample size. So the above is interpreted as 3 errors per thousand entities processed.- Returns:
- - sample size
-
setActionOnMaxError
void setActionOnMaxError(java.lang.String aAction)
Sets a strategy for dealing with exceeding error thresholds. The three supported strategies are:- terminate - termines the CPE
- continue - continue despite the error
- disable - disable CasProcessor
- Parameters:
aAction- - action to take
-
getActionOnMaxError
java.lang.String getActionOnMaxError()
Returns strategy for dealing with exceeding error thresholds. The three supported strategies are:- terminate - termines the CPE
- continue - continue despite the error
- disable - disable CasProcessor
- Returns:
- - action to take
-
setMaxRestartCount
void setMaxRestartCount(int aErrorCount)
Sets max tolerated restarts threshold for CasProcessor- Parameters:
aErrorCount- - max restart count
-
getMaxRestartCount
int getMaxRestartCount()
Returns max restarts threshold fro CasProcessor- Returns:
- - max restart count
-
setActionOnMaxRestart
void setActionOnMaxRestart(java.lang.String aAction)
Sets strategy for dealing with exceeding error thresholds. The three supported strategies are:- terminate - termines the CPE
- continue - continue despite the error
- disable - disable CasProcessor
- Parameters:
aAction- - action to take
-
getActionOnMaxRestart
java.lang.String getActionOnMaxRestart()
Returns strategy for dealing with exceeding error thresholds. The three supported strategies are:- terminate - termines the CPE
- continue - continue despite the error
- disable - disable CasProcessor
- Returns:
- the action to take when the error threshold is exceeded
-
setTimeout
void setTimeout(int aTimeoutValue)
Sets the timeout value. The amount of time the CPE will wait for response from CasProcessor- Parameters:
aTimeoutValue- - timeout value
-
getTimeout
int getTimeout()
Returns the timeout value. The amount of time the CPE will wait for response from CasProcessor- Returns:
- - timeout value
-
addDeployParam
void addDeployParam(java.lang.String aParamName, java.lang.String aParamValue) throws CpeDescriptorExceptionAdds deployment parameter used by the CPE when launching CasProcessor- Parameters:
aParamName- - param nameaParamValue- - param value- Throws:
CpeDescriptorException- tbd
-
getConfigurationParameterSettings
CasProcessorConfigurationParameterSettings getConfigurationParameterSettings()
ReturnsCasProcessorConfigurationParameterSettingsobject containing overrides to parameter settings for this CAS Processor.- Returns:
- - object containing parameter setting overrides
-
setConfigurationParameterSettings
void setConfigurationParameterSettings(CasProcessorConfigurationParameterSettings aSettings) throws CpeDescriptorException
Sets theCasProcessorConfigurationParameterSettingsobject containing overrides to parameter settings for this CAS Processor.- Parameters:
aSettings- object containing parameter setting overrides- Throws:
CpeDescriptorException- tbd
-
getSofaNameMappings
CpeSofaMappings getSofaNameMappings()
-
setSofaNameMappings
void setSofaNameMappings(CpeSofaMappings mappings)
- Parameters:
mappings- -
-
getRunInSeparateProcess
CasProcessorRunInSeperateProcess getRunInSeparateProcess()
-
setIsParallelizable
void setIsParallelizable(boolean isP)
-
getIsParallelizable
boolean getIsParallelizable()
-
-