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 ClassesModifier and TypeClassDescriptionclass
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
FieldsFields 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_EXTERNAL_OVERRIDE_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT
-
Constructor Summary
ConstructorsConstructorDescriptionPrimitiveAnalysisEngineController_impl
(String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize) PrimitiveAnalysisEngineController_impl
(AnalysisEngineController aParentController, String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize) PrimitiveAnalysisEngineController_impl
(AnalysisEngineController aParentController, String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, int aComponentCasPoolSize) PrimitiveAnalysisEngineController_impl
(AnalysisEngineController aParentController, String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, int aComponentCasPoolSize, long anInitialCasHeapSize) PrimitiveAnalysisEngineController_impl
(AnalysisEngineController aParentController, String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, int aComponentCasPoolSize, long anInitialCasHeapSize, JmxManagement aJmxManagement) PrimitiveAnalysisEngineController_impl
(AnalysisEngineController aParentController, String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, int aComponentCasPoolSize, JmxManagement aJmxManagement) PrimitiveAnalysisEngineController_impl
(AnalysisEngineController aParentController, String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, JmxManagement aJmxManagement) -
Method Summary
Modifier and TypeMethodDescriptionvoid
collectionProcessComplete
(Endpoint anEndpoint) void
dumpState
(StringBuffer buffer, String lbl1) protected final void
This method forces a heap and java dump.int
protected String
void
handleDelegateLifeCycleEvent
(String anEndpoint, int aDelegateCount) void
void
boolean
void
Forces initialization of a Cas Pool if this is a Cas Multiplier delegate collocated with an aggregate.void
This is called when a Stop request is received from a client.void
sendMetadata
(Endpoint anEndpoint) void
void
setMonitor
(Monitor monitor) void
stop()
Stops input channel(s) and initiates a shutdown of all delegates ( if this is an aggregate ).void
takeAction
(String anAction, String anEndpointName, ErrorContext anErrorContext) Executes action on error.boolean
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
-
Field Details
-
notifyObj
-
-
Constructor Details
-
PrimitiveAnalysisEngineController_impl
public PrimitiveAnalysisEngineController_impl(String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize) throws Exception - Throws:
Exception
-
PrimitiveAnalysisEngineController_impl
public PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize) throws Exception - Throws:
Exception
-
PrimitiveAnalysisEngineController_impl
public PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, int aComponentCasPoolSize) throws Exception - Throws:
Exception
-
PrimitiveAnalysisEngineController_impl
public PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, int aComponentCasPoolSize, long anInitialCasHeapSize) throws Exception - Throws:
Exception
-
PrimitiveAnalysisEngineController_impl
public PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, int aComponentCasPoolSize, JmxManagement aJmxManagement) throws Exception - Throws:
Exception
-
PrimitiveAnalysisEngineController_impl
public PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, int aComponentCasPoolSize, long anInitialCasHeapSize, JmxManagement aJmxManagement) throws Exception - Throws:
Exception
-
PrimitiveAnalysisEngineController_impl
public PrimitiveAnalysisEngineController_impl(AnalysisEngineController aParentController, String anEndpointName, String anAnalysisEngineDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, int aWorkQueueSize, int anAnalysisEnginePoolSize, JmxManagement aJmxManagement) throws Exception - Throws:
Exception
-
-
Method Details
-
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
- 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
- Specified by:
collectionProcessComplete
in interfaceAnalysisEngineController
-
process
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
- Specified by:
sendMetadata
in interfaceAnalysisEngineController
- Throws:
AsynchAEException
-
takeAction
Executes action on error. Primitive Controller allows two types of actions TERMINATE and DROPCAS.- Specified by:
takeAction
in interfaceAnalysisEngineController
-
getServiceEndpointName
- Specified by:
getServiceEndpointName
in interfaceAnalysisEngineController
-
getControllerLatch
- Specified by:
getControllerLatch
in interfaceAnalysisEngineController
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitive
in interfaceAnalysisEngineController
-
getMonitor
- Specified by:
getMonitor
in interfaceAnalysisEngineController
-
setMonitor
-
handleDelegateLifeCycleEvent
- Specified by:
handleDelegateLifeCycleEvent
in interfaceAnalysisEngineController
-
getNameFromMetadata
-
setAnalysisEngineInstancePool
- Specified by:
setAnalysisEngineInstancePool
in interfacePrimitiveAnalysisEngineController
-
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
- Specified by:
dumpState
in interfaceAnalysisEngineController
- Specified by:
dumpState
in classBaseAnalysisEngineController
-