org.apache.uima.aae.controller
Class PrimitiveAnalysisEngineController_impl

java.lang.Object
  extended by org.apache.uima.resource.Resource_ImplBase
      extended by org.apache.uima.aae.controller.BaseAnalysisEngineController
          extended by org.apache.uima.aae.controller.PrimitiveAnalysisEngineController_impl
All Implemented Interfaces:
AnalysisEngineController, ControllerLifecycle, EventSubscriber, PrimitiveAnalysisEngineController, org.apache.uima.resource.Resource

public class PrimitiveAnalysisEngineController_impl
extends BaseAnalysisEngineController
implements PrimitiveAnalysisEngineController


Nested Class Summary
 class PrimitiveAnalysisEngineController_impl.StackDumpTimer
          The HeapDumpTimer is optionally used to dump the heap if a task takes too much time to finish.
 
Nested classes/interfaces inherited from class org.apache.uima.aae.controller.BaseAnalysisEngineController
BaseAnalysisEngineController.ServiceState
 
Field Summary
protected  java.lang.Object notifyObj
           
 
Fields inherited from class org.apache.uima.aae.controller.BaseAnalysisEngineController
abortedCasesMap, aeDescriptor, allDelegatesAreRemote, awaitingCacheCallbackNotification, callbackMonitor, callbackReceived, clientEndpoint, cmOutstandingCASes, componentCasPoolSize, controllerListeners, currentState, deadClientDestinationMap, delegateKey, delegates, errorCount, errorHandlerChain, finalStepMux, idleTime, inputChannel, inputChannelList, inputChannelMap, jmxContext, latch, localCache, messageListeners, monitor, NO_RECOVERY, paramsMap, parentController, perCasStatistics, processPid, replyTime, resourceSpecifier, serviceErrorMap, serviceErrors, serviceInitialized, servicePerformance, statsMap, stopped, syncObject, transports, unregisteredDelegateList
 
Fields inherited from interface org.apache.uima.aae.controller.AnalysisEngineController
AEInstanceCount, CasPoolSize
 
Fields inherited from interface org.apache.uima.resource.Resource
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_MANAGER, PARAM_CONFIG_PARAM_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT
 
Constructor Summary
PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, java.lang.String anEndpointName, java.lang.String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize)
           
PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, java.lang.String anEndpointName, java.lang.String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, int aComponentCasPoolSize)
           
PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, java.lang.String anEndpointName, java.lang.String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, int aComponentCasPoolSize, JmxManagement aJmxManagement)
           
PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, java.lang.String anEndpointName, java.lang.String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, int aComponentCasPoolSize, long anInitialCasHeapSize)
           
PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, java.lang.String anEndpointName, java.lang.String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, int aComponentCasPoolSize, long anInitialCasHeapSize, JmxManagement aJmxManagement)
           
PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, java.lang.String anEndpointName, java.lang.String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, JmxManagement aJmxManagement)
           
PrimitiveAnalysisEngineController_impl(java.lang.String anEndpointName, java.lang.String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize)
           
 
Method Summary
 void collectionProcessComplete(Endpoint anEndpoint)
           
 void dumpState(java.lang.StringBuffer buffer, java.lang.String lbl1)
           
protected  void forceStackDump()
          This method forces a heap and java dump.
 int getAEInstanceCount()
           
 ControllerLatch getControllerLatch()
           
 Monitor getMonitor()
           
protected  java.lang.String getNameFromMetadata()
           
 java.lang.String getServiceEndpointName()
           
 PrimitiveServiceInfo getServiceInfo()
           
 void handleDelegateLifeCycleEvent(java.lang.String anEndpoint, int aDelegateCount)
           
 void initialize()
           
 void initializeAnalysisEngine()
           
 boolean isPrimitive()
           
 void onInitialize()
          Forces initialization of a Cas Pool if this is a Cas Multiplier delegate collocated with an aggregate.
 void process(org.apache.uima.cas.CAS aCAS, java.lang.String aCasReferenceId, Endpoint anEndpoint)
          This is called when a Stop request is received from a client.
 void sendMetadata(Endpoint anEndpoint)
           
 void setAnalysisEngineInstancePool(AnalysisEngineInstancePool aPool)
           
 void setMonitor(Monitor monitor)
           
 void stop()
          Stops input channel(s) and initiates a shutdown of all delegates ( if this is an aggregate ).
 void takeAction(java.lang.String anAction, java.lang.String anEndpointName, ErrorContext anErrorContext)
          Executes action on error.
 boolean threadAssignedToAE()
           
 
Methods inherited from class org.apache.uima.aae.controller.BaseAnalysisEngineController
abortGeneratingCASes, addAbortedCasReferenceId, addControllerCallbackListener, addInputChannel, addServiceInfo, beginProcess, cacheClientEndpoint, changeState, cleanUp, clearStats, dropCAS, dropCAS, dropCasStatistics, dropStats, endProcess, exceedsThresholdWithinWindow, forceTimeoutOnPendingCases, getAnalysisTime, getBrokerURL, getCasManagerWrapper, getCasMultiplierController, getCasStatistics, getChildUimaContext, getClientEndpoint, getComponentName, getCpuTime, getDeadClientMap, getDeploymentDescriptor, getDeploymentMode, getErrorHandlerChain, getEventListener, getIdleTime, getIdleTimeBetweenProcessCalls, getIndex, getInProcessCache, getInputChannel, getInputChannel, getInputQueue, getJmxContext, getJMXDomain, getKey, getLocalCache, getManagementInterface, getName, getOutputChannel, getParentController, getReplyInputChannel, getReplyTime, getResourceSpecifier, getServiceErrors, getServiceName, getServicePerformance, getState, getStats, getTime, getTotalNumberOfCASesDropped, getTotalNumberOfCASesProcessed, getTotalNumberOfCASesReceived, getTotalNumberOfErrors, getTotalTimeSpendDeSerializingCAS, getTotalTimeSpentSerializingCAS, getTotalTimeSpentWaitingForFreeCASInstance, getTransport, getTransport, getTransport, getUimaEEAdminContext, getUimaMessageListener, handleAction, handleError, incrementDeserializationTime, incrementErrorCounter, incrementSerializationTime, initializeVMTransport, isAwaitingCacheCallbackNotification, isCasMultiplier, isStopped, isTopLevelComponent, logStats, logStats, notifyListenersWithInitializationStatus, onCacheEmpty, plugInDefaultErrorHandlerChain, process, process, quiesceAndStop, registerServiceWithJMX, registerVmQueueWithJMX, registerWithAgent, releaseNextCas, removeControllerCallbackListener, resetErrorCounter, saveReplyTime, saveTime, sendMetadata, setCasManager, setDeployDescriptor, setErrorHandlerChain, setInputChannel, setJmxManagement, setOutputChannel, setStopped, setUimaEEAdminContext, stop, stopCasMultiplier, stopCasMultipliers, stopDelegateTimers, stopInputChannel, stopInputChannels, stopTransportLayer, terminate, terminate, toString
 
Methods inherited from class org.apache.uima.resource.Resource_ImplBase
destroy, getCasManager, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger, setMetaData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.uima.aae.controller.PrimitiveAnalysisEngineController
addAbortedCasReferenceId
 
Methods inherited from interface org.apache.uima.aae.controller.AnalysisEngineController
addInputChannel, addServiceInfo, beginProcess, cacheClientEndpoint, changeState, dropCAS, dropCAS, dropStats, endProcess, forceTimeoutOnPendingCases, getAnalysisTime, getCasManagerWrapper, getCasStatistics, getChildUimaContext, getClientEndpoint, getComponentName, getCpuTime, getDeadClientMap, getErrorHandlerChain, getEventListener, getIdleTime, getIdleTimeBetweenProcessCalls, getIndex, getInProcessCache, getInputChannel, getInputChannel, getJmxContext, getJMXDomain, getKey, getLocalCache, getManagementInterface, getName, getOutputChannel, getParentController, getReplyInputChannel, getReplyTime, getServiceErrors, getServicePerformance, getState, getStats, getTime, getTransport, getTransport, getUimaEEAdminContext, getUimaMessageListener, incrementDeserializationTime, incrementSerializationTime, initializeVMTransport, isAwaitingCacheCallbackNotification, isCasMultiplier, isStopped, isTopLevelComponent, notifyListenersWithInitializationStatus, process, process, quiesceAndStop, registerVmQueueWithJMX, releaseNextCas, saveReplyTime, saveTime, setCasManager, setDeployDescriptor, setInputChannel, setOutputChannel, setStopped, setUimaEEAdminContext
 
Methods inherited from interface org.apache.uima.aae.controller.ControllerLifecycle
addControllerCallbackListener, removeControllerCallbackListener, terminate
 

Field Detail

notifyObj

protected java.lang.Object notifyObj
Constructor Detail

PrimitiveAnalysisEngineController_impl

public PrimitiveAnalysisEngineController_impl(java.lang.String anEndpointName,
                                              java.lang.String anAnalysisEngineDescriptor,
                                              AsynchAECasManager aCasManager,
                                              InProcessCache anInProcessCache,
                                              int aWorkQueueSize,
                                              int anAnalysisEnginePoolSize)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

PrimitiveAnalysisEngineController_impl

public PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController,
                                              java.lang.String anEndpointName,
                                              java.lang.String anAnalysisEngineDescriptor,
                                              AsynchAECasManager aCasManager,
                                              InProcessCache anInProcessCache,
                                              int aWorkQueueSize,
                                              int anAnalysisEnginePoolSize)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

PrimitiveAnalysisEngineController_impl

public PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController,
                                              java.lang.String anEndpointName,
                                              java.lang.String anAnalysisEngineDescriptor,
                                              AsynchAECasManager aCasManager,
                                              InProcessCache anInProcessCache,
                                              int aWorkQueueSize,
                                              int anAnalysisEnginePoolSize,
                                              int aComponentCasPoolSize)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

PrimitiveAnalysisEngineController_impl

public PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController,
                                              java.lang.String anEndpointName,
                                              java.lang.String anAnalysisEngineDescriptor,
                                              AsynchAECasManager aCasManager,
                                              InProcessCache anInProcessCache,
                                              int aWorkQueueSize,
                                              int anAnalysisEnginePoolSize,
                                              int aComponentCasPoolSize,
                                              long anInitialCasHeapSize)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

PrimitiveAnalysisEngineController_impl

public PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController,
                                              java.lang.String anEndpointName,
                                              java.lang.String anAnalysisEngineDescriptor,
                                              AsynchAECasManager aCasManager,
                                              InProcessCache anInProcessCache,
                                              int aWorkQueueSize,
                                              int anAnalysisEnginePoolSize,
                                              int aComponentCasPoolSize,
                                              JmxManagement aJmxManagement)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

PrimitiveAnalysisEngineController_impl

public PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController,
                                              java.lang.String anEndpointName,
                                              java.lang.String anAnalysisEngineDescriptor,
                                              AsynchAECasManager aCasManager,
                                              InProcessCache anInProcessCache,
                                              int aWorkQueueSize,
                                              int anAnalysisEnginePoolSize,
                                              int aComponentCasPoolSize,
                                              long anInitialCasHeapSize,
                                              JmxManagement aJmxManagement)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

PrimitiveAnalysisEngineController_impl

public PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController,
                                              java.lang.String anEndpointName,
                                              java.lang.String anAnalysisEngineDescriptor,
                                              AsynchAECasManager aCasManager,
                                              InProcessCache anInProcessCache,
                                              int aWorkQueueSize,
                                              int anAnalysisEnginePoolSize,
                                              JmxManagement aJmxManagement)
                                       throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getAEInstanceCount

public int getAEInstanceCount()
Specified by:
getAEInstanceCount in interface PrimitiveAnalysisEngineController

initializeAnalysisEngine

public void initializeAnalysisEngine()
                              throws org.apache.uima.resource.ResourceInitializationException
Specified by:
initializeAnalysisEngine in interface PrimitiveAnalysisEngineController
Throws:
org.apache.uima.resource.ResourceInitializationException

threadAssignedToAE

public boolean threadAssignedToAE()
Specified by:
threadAssignedToAE in interface PrimitiveAnalysisEngineController

initialize

public void initialize()
                throws AsynchAEException
Specified by:
initialize in interface AnalysisEngineController
Throws:
AsynchAEException

onInitialize

public void onInitialize()
Forces initialization of a Cas Pool if this is a Cas Multiplier delegate collocated with an aggregate. The parent aggregate calls this method when all type systems have been merged.

Specified by:
onInitialize in interface AnalysisEngineController

collectionProcessComplete

public void collectionProcessComplete(Endpoint anEndpoint)
Specified by:
collectionProcessComplete in interface AnalysisEngineController

process

public void process(org.apache.uima.cas.CAS aCAS,
                    java.lang.String aCasReferenceId,
                    Endpoint anEndpoint)
This is called when a Stop request is received from a client. Add the provided Cas id to the list of aborted CASes. The process() method checks this list to determine if it should continue generating children.

Specified by:
process in interface AnalysisEngineController
Overrides:
process in class BaseAnalysisEngineController
Parameters:
aCasReferenceId - - Id of an input CAS. The client wants to stop generation of child CASes from this CAS.

sendMetadata

public void sendMetadata(Endpoint anEndpoint)
                  throws AsynchAEException
Specified by:
sendMetadata in interface AnalysisEngineController
Throws:
AsynchAEException

takeAction

public void takeAction(java.lang.String anAction,
                       java.lang.String anEndpointName,
                       ErrorContext anErrorContext)
Executes action on error. Primitive Controller allows two types of actions TERMINATE and DROPCAS.

Specified by:
takeAction in interface AnalysisEngineController

getServiceEndpointName

public java.lang.String getServiceEndpointName()
Specified by:
getServiceEndpointName in interface AnalysisEngineController

getControllerLatch

public ControllerLatch getControllerLatch()
Specified by:
getControllerLatch in interface AnalysisEngineController

isPrimitive

public boolean isPrimitive()
Specified by:
isPrimitive in interface AnalysisEngineController

getMonitor

public Monitor getMonitor()
Specified by:
getMonitor in interface AnalysisEngineController

setMonitor

public void setMonitor(Monitor monitor)

handleDelegateLifeCycleEvent

public void handleDelegateLifeCycleEvent(java.lang.String anEndpoint,
                                         int aDelegateCount)
Specified by:
handleDelegateLifeCycleEvent in interface AnalysisEngineController

getNameFromMetadata

protected java.lang.String getNameFromMetadata()

setAnalysisEngineInstancePool

public void setAnalysisEngineInstancePool(AnalysisEngineInstancePool aPool)
Specified by:
setAnalysisEngineInstancePool in interface PrimitiveAnalysisEngineController

getServiceInfo

public PrimitiveServiceInfo getServiceInfo()
Specified by:
getServiceInfo in interface AnalysisEngineController
Specified by:
getServiceInfo in interface PrimitiveAnalysisEngineController

stop

public void stop()
Description copied from class: BaseAnalysisEngineController
Stops input channel(s) and initiates a shutdown of all delegates ( if this is an aggregate ). At the end sends an Exception to the client and closes an output channel.

Specified by:
stop in interface AnalysisEngineController
Overrides:
stop in class BaseAnalysisEngineController

forceStackDump

protected final void forceStackDump()
This method forces a heap and java dump. It only works with IBM jvm.


dumpState

public void dumpState(java.lang.StringBuffer buffer,
                      java.lang.String lbl1)
Specified by:
dumpState in interface AnalysisEngineController
Specified by:
dumpState in class BaseAnalysisEngineController


Copyright © 2012. All Rights Reserved.