Package org.apache.uima.collection.metadata

Examples of org.apache.uima.collection.metadata.CasProcessorErrorHandling


   *
   * @param aAction -
   *          action string
   */
  public void setActionOnMaxError(String aAction) {
    CasProcessorErrorHandling eh = getErrorHandling();
    if (eh != null && eh.getErrorRateThreshold() != null) {
      eh.getErrorRateThreshold().setAction(aAction);
    }
  }
View Full Code Here


   * Return action associated with CasProcessor error tolerance.
   *
   * @return - action as string ( terminate, continue, disable), null when not defined
   */
  public String getActionOnMaxError() {
    CasProcessorErrorHandling eh = getErrorHandling();
    if (eh != null && eh.getErrorRateThreshold() != null) {
      return eh.getErrorRateThreshold().getAction();
    }
    return null;
  }
View Full Code Here

   *
   * @param aAction -
   *          action string
   */
  public void setActionOnMaxRestart(String aAction) {
    CasProcessorErrorHandling eh = getErrorHandling();
    if (eh != null && eh.getMaxConsecutiveRestarts() != null) {
      eh.getMaxConsecutiveRestarts().setAction(aAction);
    }
  }
View Full Code Here

   * Return action associated with CasProcessor restart tolerance.
   *
   * @return - action as string ( terminate, continue, disable), null when not defined
   */
  public String getActionOnMaxRestart() {
    CasProcessorErrorHandling eh = getErrorHandling();
    if (eh != null && eh.getMaxConsecutiveRestarts() != null) {
      return eh.getMaxConsecutiveRestarts().getAction();
    }
    return null;
  }
View Full Code Here

   *
   * @param aRestartCount -
   *          max number of restarts
   */
  public void setMaxRestartCount(int aRestartCount) {
    CasProcessorErrorHandling eh = getErrorHandling();
    if (eh != null && eh.getMaxConsecutiveRestarts() != null) {
      eh.getMaxConsecutiveRestarts().setRestartCount(aRestartCount);
    }
  }
View Full Code Here

   * Returns max restart tolerance for this CasProcessor.
   *
   * @return - restart count as int, 0 if not defined
   */
  public int getMaxRestartCount() {
    CasProcessorErrorHandling eh = getErrorHandling();
    if (eh != null && eh.getMaxConsecutiveRestarts() != null) {
      return eh.getMaxConsecutiveRestarts().getRestartCount();
    }
    return 0;
  }
View Full Code Here

   *
   * @param aTimeoutValue -
   *          millis to wait for response
   */
  public void setTimeout(int aTimeoutValue) {
    CasProcessorErrorHandling eh = getErrorHandling();
    if (eh != null && eh.getTimeout() != null) {
      eh.getTimeout().set(aTimeoutValue);
    }
  }
View Full Code Here

   * Returns max millis to wait for CasProcessor response
   *
   * @return - millis, 0 if not defined
   */
  public int getTimeout() {
    CasProcessorErrorHandling eh = getErrorHandling();
    if (eh != null && eh.getTimeout() != null) {
      return eh.getTimeout().get();
    }

    return 0;
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.collection.metadata.CasProcessorErrorHandling

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.