Package org.apache.uima.aae.controller
Class PrimitiveAnalysisEngineController_impl
- java.lang.Object
-
- org.apache.uima.resource.Resource_ImplBase
-
- org.apache.uima.aae.controller.BaseAnalysisEngineController
-
- 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
Nested Classes Modifier and Type Class Description 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
Fields Modifier and Type Field Description 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
-
-
Constructor Summary
Constructors Constructor Description PrimitiveAnalysisEngineController_impl(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)
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, 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, int aComponentCasPoolSize, JmxManagement aJmxManagement)
PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, java.lang.String anEndpointName, java.lang.String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, JmxManagement aJmxManagement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, getRelativePathResolver, 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.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
-
Methods inherited from interface org.apache.uima.aae.controller.PrimitiveAnalysisEngineController
addAbortedCasReferenceId
-
-
-
-
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 interfacePrimitiveAnalysisEngineController
-
initializeAnalysisEngine
public void initializeAnalysisEngine() throws org.apache.uima.resource.ResourceInitializationException
- Specified by:
initializeAnalysisEngine
in interfacePrimitiveAnalysisEngineController
- Throws:
org.apache.uima.resource.ResourceInitializationException
-
threadAssignedToAE
public boolean threadAssignedToAE()
- Specified by:
threadAssignedToAE
in interfacePrimitiveAnalysisEngineController
-
initialize
public void initialize() throws AsynchAEException
- Specified by:
initialize
in interfaceAnalysisEngineController
- 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 interfaceAnalysisEngineController
-
collectionProcessComplete
public void collectionProcessComplete(Endpoint anEndpoint)
- Specified by:
collectionProcessComplete
in interfaceAnalysisEngineController
-
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 interfaceAnalysisEngineController
- Overrides:
process
in classBaseAnalysisEngineController
- 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 interfaceAnalysisEngineController
- 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 interfaceAnalysisEngineController
-
getServiceEndpointName
public java.lang.String getServiceEndpointName()
- Specified by:
getServiceEndpointName
in interfaceAnalysisEngineController
-
getControllerLatch
public ControllerLatch getControllerLatch()
- Specified by:
getControllerLatch
in interfaceAnalysisEngineController
-
isPrimitive
public boolean isPrimitive()
- Specified by:
isPrimitive
in interfaceAnalysisEngineController
-
getMonitor
public Monitor getMonitor()
- Specified by:
getMonitor
in interfaceAnalysisEngineController
-
setMonitor
public void setMonitor(Monitor monitor)
-
handleDelegateLifeCycleEvent
public void handleDelegateLifeCycleEvent(java.lang.String anEndpoint, int aDelegateCount)
- Specified by:
handleDelegateLifeCycleEvent
in interfaceAnalysisEngineController
-
getNameFromMetadata
protected java.lang.String getNameFromMetadata()
-
setAnalysisEngineInstancePool
public void setAnalysisEngineInstancePool(AnalysisEngineInstancePool aPool)
- Specified by:
setAnalysisEngineInstancePool
in interfacePrimitiveAnalysisEngineController
-
getServiceInfo
public PrimitiveServiceInfo getServiceInfo()
- Specified by:
getServiceInfo
in interfaceAnalysisEngineController
- Specified by:
getServiceInfo
in interfacePrimitiveAnalysisEngineController
-
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 interfaceAnalysisEngineController
- Overrides:
stop
in classBaseAnalysisEngineController
-
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 interfaceAnalysisEngineController
- Specified by:
dumpState
in classBaseAnalysisEngineController
-
-