org.apache.uima.collection.metadata

## Interface CasProcessorMaxRestarts

- All Superinterfaces:
    Cloneable, MetaDataObject, Serializable, XMLizable

      public interface CasProcessorMaxRestarts
      extends MetaDataObject

  An object that holds configuration related to handling max restarts for CasProcessors. It provides the means of configuring threshold for max restart tolerance, and defining a strategy to apply when thresholds are exceeded. Used when constucting a CPE descriptor.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAction()` Returns a strategy to apply by the CPE when max restart count is exceeded.
    `int` | `getRestartCount()` Returns max restarts threshold fro CasProcessor
    `int` | `getWaitTimeBetweenRetries()`
    `void` | `setAction(String aAction)` Sets a strategy to apply by the CPE when max restart count is exceeded.
    `void` | `setRestartCount(int aRestartCount)` Sets max tolerated restarts threshold for CasProcessor
    `void` | `setWaitTimeBetweenRetries(int i)`

    - ### 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

    - #### setRestartCount

          void setRestartCount(int aRestartCount)

      Sets max tolerated restarts threshold for CasProcessor
      Parameters:
        `aRestartCount` - - max restart count

    - #### getRestartCount

          int getRestartCount()

      Returns max restarts threshold fro CasProcessor
      Returns:
        - restart count

    - #### setAction

          void setAction(String aAction)

      Sets a strategy to apply by the CPE when max restart count is exceeded. The three supported strategies are:
      - terminate - termines the CPE
      - continue - continue despite the error
      - disable - disable CasProcessor
      Parameters:
        `aAction` - - action to take

    - #### getAction

          String getAction()

      Returns a strategy to apply by the CPE when max restart count is exceeded. The three supported strategies are:
      - terminate - termines the CPE
      - continue - continue despite the error
      - disable - disable CasProcessor
      Returns:
        - action as String

    - #### getWaitTimeBetweenRetries

          int getWaitTimeBetweenRetries()

      Returns:
        the wait time between successive retries

    - #### setWaitTimeBetweenRetries

          void setWaitTimeBetweenRetries(int i)

      Parameters:
        `i` - time to wait between successive retries

Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.