Examples of releaseCasProcessor()


Examples of org.apache.uima.collection.impl.base_cpm.container.ProcessingContainer.releaseCasProcessor()

        // Check to see if the CasProcessor is available for processing
        // Container may have been disabled by another thread, so first check
        if (!isProcessorReady(container.getStatus())) {
          maybeLogFinest("UIMA_CPM_container_not_ready__FINEST", container);
          if (container.getStatus() == Constants.CAS_PROCESSOR_KILLED) {
            container.releaseCasProcessor(processor);
            // Another thread has initiated CPM Abort. That Thread has already notified
            // the application of the Abort. Here we just return as the CPM has been
            // killed most likely due to excessive errors.
            return false;
          }
View Full Code Here

Examples of org.apache.uima.collection.impl.base_cpm.container.ProcessingContainer.releaseCasProcessor()

            maybeLogFinest("UIMA_CPM_container_paused__FINEST", container);
            // Release current Cas Processor before continuing with the next Cas Processor in the
            // pipeline
            if (processor != null) {
              container.releaseCasProcessor(processor);
              maybeLogFinest("UIMA_CPM_ok_released_cp__FINEST", container);
              processor = null;
            }
            try {
              pTrTemp.endEvent(container.getName(), "Process", "failed");
View Full Code Here

Examples of org.apache.uima.collection.impl.base_cpm.container.ProcessingContainer.releaseCasProcessor()

            // - terminates CPM when threshold is reached ( method below throws AbortCPMException)
            // - disables CasProcessor ( method below throws AbortCasProcessorException )
            // - continue, CasProcessor continues to run dispite error
            container.incrementCasProcessorErrors(e);

            container.releaseCasProcessor(processor);
            processor = null;
            if (cpm.dropCasOnException()) {
              // Cas has already been returned to the CAS pool. The policy requires to stop the
              // processing chain for this CAS and
              // to get another CAS for processing.
View Full Code Here

Examples of org.apache.uima.collection.impl.base_cpm.container.ProcessingContainer.releaseCasProcessor()

          } catch (SkipCasException ex) {
            try {
              // Release current Cas Processor before continuing with the next Cas Processor in the
              // pipeline
              if (processor != null) {
                container.releaseCasProcessor(processor);
              }

              handleSkipCasProcessor(container, aCasObjectList,
                      (i == (processContainers.size() - 1)));
            } catch (Exception sEx) {
View Full Code Here

Examples of org.apache.uima.collection.impl.base_cpm.container.ProcessingContainer.releaseCasProcessor()

        processor = null;
      } while (retry); // retry loop

      if (processor != null) {
        maybeLogFinest("UIMA_CPM_release_cp__FINEST", container, processor, casCache);
        container.releaseCasProcessor(processor);
        processor = null;
        maybeLogFinest("UIMA_CPM_ok_release_cp__FINEST", container, processor, casCache);
      }

    } // end of: For All CasProcessors
View Full Code Here

Examples of org.apache.uima.collection.impl.base_cpm.container.ProcessingContainer.releaseCasProcessor()

          // defined
          // in the CPE descriptor.
          if (!isProcessorReady(container.getStatus())) {
            maybeLogFinest("UIMA_CPM_container_not_ready__FINEST", container);
            if (container.getStatus() == Constants.CAS_PROCESSOR_KILLED) {
              container.releaseCasProcessor(processor);
              // Another thread has initiated CPM Abort. That Thread has already notified
              // the application of the Abort. Here we just return as the CPM has been
              // killed most likely due to excessive errors.
              return false;
            }
View Full Code Here

Examples of org.apache.uima.collection.impl.base_cpm.container.ProcessingContainer.releaseCasProcessor()

        if (md != null) {
          manager.addMetaData(md);
        }
      }
      finally {
        container.releaseCasProcessor(processor);
      }
    }
    for (int i = 0; i < consumerList.size(); i++) {
      ProcessingContainer container = (ProcessingContainer) consumerList.get(i);
      if (container.getStatus() == Constants.CAS_PROCESSOR_DISABLED) {
View Full Code Here

Examples of org.apache.uima.collection.impl.base_cpm.container.ProcessingContainer.releaseCasProcessor()

        if (md != null) {
          manager.addMetaData(md);
        }
      }
      finally {
        container.releaseCasProcessor(processor);
      }
    }
  }

  /**
 
View Full Code Here

Examples of org.apache.uima.collection.impl.base_cpm.container.ProcessingContainer.releaseCasProcessor()

        }
        CasProcessor processor = container.getCasProcessor();
        if (processor instanceof CasObjectProcessor) {
          ((CasObjectProcessor) processor).typeSystemInit(cas.getTypeSystem());
        }
        container.releaseCasProcessor(processor);
      }
      for (int i = 0; i < consumerList.size(); i++) {
        ProcessingContainer container = (ProcessingContainer) consumerList.get(i);
        if (container.getStatus() == Constants.CAS_PROCESSOR_DISABLED) {
          continue; // skip over disabled CasProcessors
View Full Code Here

Examples of org.apache.uima.collection.impl.base_cpm.container.ProcessingContainer.releaseCasProcessor()

        }
        CasProcessor processor = container.getCasProcessor();
        if (processor instanceof CasObjectProcessor) {
          ((CasObjectProcessor) processor).typeSystemInit(cas.getTypeSystem());
        }
        container.releaseCasProcessor(processor);
      }
    } catch (ResourceInitializationException e) {
      throw e;
    } catch (Exception e) {
      throw new ResourceInitializationException(e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.