Class CasProcessorCpeObject

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        The Constant serialVersionUID.
        See Also:
        Constant Field Values
      • actionArray

        private static final java.lang.String[] actionArray
        The Constant actionArray.
      • deployArray

        private static final java.lang.String[] deployArray
        The Constant deployArray.
      • parameters

        private Parameter[] parameters
        The parameters.
      • deployment

        private java.lang.String deployment
        The deployment.
      • name

        private java.lang.String name
        The name.
      • sofaNameMappings

        private CpeSofaMappings sofaNameMappings
        The sofa name mappings.
      • isParallelizable

        private boolean isParallelizable
        The is parallelizable.
      • XMLIZATION_INFO

        private static final XmlizationInfo XMLIZATION_INFO
        The Constant XMLIZATION_INFO.
    • Constructor Detail

      • CasProcessorCpeObject

        public CasProcessorCpeObject()
    • Method Detail

      • setDeployment

        public void setDeployment​(java.lang.String aDeployMode)
                           throws CpeDescriptorException
        Associates deployment type with for this CasProcessor. Three types are currently supported:
        • integrated - CasProcessor is collocated with the CPM
        • local - CasProcessor runs on the same machine as the CPM however in a different process
        • remote - CasProcessor runs on remote machine
        Parameters:
        aDeployMode - - String identifying deployment type
        Throws:
        CpeDescriptorException - - if invalid deployment type is provided
      • getDeployment

        public java.lang.String getDeployment()
        Returns deployment type associated with this CasProcessor.
        Specified by:
        getDeployment in interface CpeCasProcessor
        Returns:
        String - deployment type
      • getDescriptor

        @Deprecated
        public java.lang.String getDescriptor()
        Deprecated.
        Doesn't support the new import syntax. Use getCpeComponentDescriptor().findAbsoluteUrl() instead.
        Returns a descriptor path associated with this CasProcessor.
        Specified by:
        getDescriptor in interface CpeCasProcessor
        Returns:
        String - descriptor path
      • setCasProcessorFilter

        public void setCasProcessorFilter​(java.lang.String aFilterExpression)
        Associates a filter string with this CasProcessor. A filter provides a mechanism that facilitates efficient routing of Cas's to the CasProcessor.
        Specified by:
        setCasProcessorFilter in interface CpeCasProcessor
        Parameters:
        aFilterExpression - - String containing a filter
      • getCasProcessorFilter

        public java.lang.String getCasProcessorFilter()
        Returns filter string associated with this CasProcessor.
        Specified by:
        getCasProcessorFilter in interface CpeCasProcessor
        Returns:
        String - a filter string
      • setBatchSize

        public void setBatchSize​(int aBatchSize)
        Associates a batch size with this CasProcessor.
        Specified by:
        setBatchSize in interface CpeCasProcessor
        Parameters:
        aBatchSize - - batch size of this CasProcessor
      • getBatchSize

        public int getBatchSize()
        Returns a batch size associated with this CasProcessor.
        Specified by:
        getBatchSize in interface CpeCasProcessor
        Returns:
        - batch size as int, 0 if not defined.
      • deleteParam

        private int deleteParam​(java.lang.String aParamName)
                         throws CpeDescriptorException
        Deletes a given param from a param list if it exists. Returns a position in the current Param List for a given 'aParamName'.
        Parameters:
        aParamName - - name of the param to find.
        Returns:
        - position in the list as int, -1 if not found
        Throws:
        CpeDescriptorException - the cpe descriptor exception
      • addDeployParam

        public void addDeployParam​(java.lang.String aParamName,
                                   java.lang.String aParamValue)
                            throws CpeDescriptorException
        Adds a given deployment param to the param list. If a param with a given name exists in the list its value will be over-written.
        Specified by:
        addDeployParam in interface CpeCasProcessor
        Parameters:
        aParamName - - name of the new parameter
        aParamValue - - value of the new parameter
        Throws:
        CpeDescriptorException - tbd
      • getName

        public java.lang.String getName()
        Returns a name of this CasProcessor.
        Specified by:
        getName in interface CpeCasProcessor
        Returns:
        - CasProcessor name as string, null if name undefined
      • setMaxErrorCount

        public void setMaxErrorCount​(int aErrorCount)
        Associates a threshold for maximum error tolerance. Errors are defined in terms as a quotient. For example, 4/1000 which means max 4 errors per thousand (sample size) CAS's processed. The sample size is defined seperately.
        Specified by:
        setMaxErrorCount in interface CpeCasProcessor
        Parameters:
        aErrorCount - - max error tolerance
      • getMaxErrorCount

        public int getMaxErrorCount()
        Associates a threshold for maximum error tolerance. Errors are defined in terms as a quotient. For example, 4/1000 which means max 4 errors per thousand (sample size) CAS's processed. The sample size is defined seperately.
        Specified by:
        getMaxErrorCount in interface CpeCasProcessor
        Returns:
        max error tolerance
      • setMaxErrorSampleSize

        public void setMaxErrorSampleSize​(int aErrorSampleSize)
        Associates a threshold for maximum error tolerance. Errors are defined in terms as a quotient. For example, 4/1000 which means max 4 errors per thousand (sample size) CAS's processed. The sample size is defined seperately.
        Specified by:
        setMaxErrorSampleSize in interface CpeCasProcessor
        Parameters:
        aErrorSampleSize - - max error tolerance
      • getMaxErrorSampleSize

        public int getMaxErrorSampleSize()
        Returns error sample size. The value is used to determine the max error tolerance for this CasProcessor. Error thresholds are defines as quotients. Error Count / Sample Size for example, 3/1000, which means 3 errors per thousand.
        Specified by:
        getMaxErrorSampleSize in interface CpeCasProcessor
        Returns:
        - the sample size
      • validAction

        private boolean validAction​(java.lang.String aAction)
        Check if the action String is valid.
        Parameters:
        aAction - - action as string
        Returns:
        - true is valid, false otherwise
      • setActionOnMaxError

        public void setActionOnMaxError​(java.lang.String aAction)
        Associates action in the event the errors exceed max tolerance. In such case, the action determines appropriate strategy ( terminate, continue, disable).
        Specified by:
        setActionOnMaxError in interface CpeCasProcessor
        Parameters:
        aAction - - action string
      • getActionOnMaxError

        public java.lang.String getActionOnMaxError()
        Return action associated with CasProcessor error tolerance.
        Specified by:
        getActionOnMaxError in interface CpeCasProcessor
        Returns:
        - action as string ( terminate, continue, disable), null when not defined
      • setActionOnMaxRestart

        public void setActionOnMaxRestart​(java.lang.String aAction)
        Associates action in the event CasProcessor restarts exceed max tolerance. In such case, the action determines appropriate strategy ( terminate, continue, disable).
        Specified by:
        setActionOnMaxRestart in interface CpeCasProcessor
        Parameters:
        aAction - - action string
      • getActionOnMaxRestart

        public java.lang.String getActionOnMaxRestart()
        Return action associated with CasProcessor restart tolerance.
        Specified by:
        getActionOnMaxRestart in interface CpeCasProcessor
        Returns:
        - action as string ( terminate, continue, disable), null when not defined
      • setMaxRestartCount

        public void setMaxRestartCount​(int aRestartCount)
        Associates max tolerance for CasProcessor restarts.
        Specified by:
        setMaxRestartCount in interface CpeCasProcessor
        Parameters:
        aRestartCount - - max number of restarts
      • getMaxRestartCount

        public int getMaxRestartCount()
        Returns max restart tolerance for this CasProcessor.
        Specified by:
        getMaxRestartCount in interface CpeCasProcessor
        Returns:
        - restart count as int, 0 if not defined
      • setTimeout

        public void setTimeout​(int aTimeoutValue)
        Associates timeout in terms of ms, with this CasProcessor. It is the max number of millis to wait for response.
        Specified by:
        setTimeout in interface CpeCasProcessor
        Parameters:
        aTimeoutValue - - millis to wait for response
      • getTimeout

        public int getTimeout()
        Returns max millis to wait for CasProcessor response.
        Specified by:
        getTimeout in interface CpeCasProcessor
        Returns:
        - millis, 0 if not defined
      • setParameterSettings

        public void setParameterSettings​(ConfigurationParameterSettings settings)
        Sets the parameter settings.
        Parameters:
        settings - the new parameter settings
      • getParameterSettings

        public ConfigurationParameterSettings getParameterSettings()
        Gets the parameter settings.
        Returns:
        configuration parameter settings
      • getParameters

        public Parameter[] getParameters()
        Gets the parameters.
        Returns:
        parameters
      • setCheckpoint

        public void setCheckpoint​(CpeCheckpoint checkpoint)
        Sets the checkpoint.
        Parameters:
        checkpoint - the new checkpoint
      • setParameters

        public void setParameters​(Parameter[] aparameters)
        Sets the parameters.
        Parameters:
        aparameters - the new parameters
      • setFilter

        public void setFilter​(CasProcessorFilter aFilter)
        Sets the filter.
        Parameters:
        aFilter - the new filter
      • setRunInSeparateProcess

        public void setRunInSeparateProcess​(CasProcessorRunInSeperateProcess process)
        Sets the run in separate process.
        Parameters:
        process - container with configuration info for running CasProcessor in separate process
      • getDeploymentParameters

        public CasProcessorDeploymentParams getDeploymentParameters()
        Gets the deployment parameters.
        Returns:
        deployment parameters
      • setDeploymentParameters

        public void setDeploymentParameters​(CasProcessorDeploymentParams parameters)
        Sets the deployment parameters.
        Parameters:
        parameters - deployment parameters
      • getXmlizationInfo

        protected XmlizationInfo getXmlizationInfo()
        Description copied from class: MetaDataObject_impl
        To be implemented by subclasses to return information describing how to represent this object in XML.
        Specified by:
        getXmlizationInfo in class MetaDataObject_impl
        Returns:
        information defining this object's XML representation