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 classPrimitiveAnalysisEngineController_impl.StackDumpTimerThe 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.ObjectnotifyObj-
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 voidcollectionProcessComplete(Endpoint anEndpoint)voiddumpState(java.lang.StringBuffer buffer, java.lang.String lbl1)protected voidforceStackDump()This method forces a heap and java dump.intgetAEInstanceCount()ControllerLatchgetControllerLatch()MonitorgetMonitor()protected java.lang.StringgetNameFromMetadata()java.lang.StringgetServiceEndpointName()PrimitiveServiceInfogetServiceInfo()voidhandleDelegateLifeCycleEvent(java.lang.String anEndpoint, int aDelegateCount)voidinitialize()voidinitializeAnalysisEngine()booleanisPrimitive()voidonInitialize()Forces initialization of a Cas Pool if this is a Cas Multiplier delegate collocated with an aggregate.voidprocess(org.apache.uima.cas.CAS aCAS, java.lang.String aCasReferenceId, Endpoint anEndpoint)This is called when a Stop request is received from a client.voidsendMetadata(Endpoint anEndpoint)voidsetAnalysisEngineInstancePool(AnalysisEngineInstancePool aPool)voidsetMonitor(Monitor monitor)voidstop()Stops input channel(s) and initiates a shutdown of all delegates ( if this is an aggregate ).voidtakeAction(java.lang.String anAction, java.lang.String anEndpointName, ErrorContext anErrorContext)Executes action on error.booleanthreadAssignedToAE()-
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:
getAEInstanceCountin interfacePrimitiveAnalysisEngineController
-
initializeAnalysisEngine
public void initializeAnalysisEngine() throws org.apache.uima.resource.ResourceInitializationException- Specified by:
initializeAnalysisEnginein interfacePrimitiveAnalysisEngineController- Throws:
org.apache.uima.resource.ResourceInitializationException
-
threadAssignedToAE
public boolean threadAssignedToAE()
- Specified by:
threadAssignedToAEin interfacePrimitiveAnalysisEngineController
-
initialize
public void initialize() throws AsynchAEException- Specified by:
initializein 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:
onInitializein interfaceAnalysisEngineController
-
collectionProcessComplete
public void collectionProcessComplete(Endpoint anEndpoint)
- Specified by:
collectionProcessCompletein 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:
processin interfaceAnalysisEngineController- Overrides:
processin 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:
sendMetadatain 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:
takeActionin interfaceAnalysisEngineController
-
getServiceEndpointName
public java.lang.String getServiceEndpointName()
- Specified by:
getServiceEndpointNamein interfaceAnalysisEngineController
-
getControllerLatch
public ControllerLatch getControllerLatch()
- Specified by:
getControllerLatchin interfaceAnalysisEngineController
-
isPrimitive
public boolean isPrimitive()
- Specified by:
isPrimitivein interfaceAnalysisEngineController
-
getMonitor
public Monitor getMonitor()
- Specified by:
getMonitorin interfaceAnalysisEngineController
-
setMonitor
public void setMonitor(Monitor monitor)
-
handleDelegateLifeCycleEvent
public void handleDelegateLifeCycleEvent(java.lang.String anEndpoint, int aDelegateCount)- Specified by:
handleDelegateLifeCycleEventin interfaceAnalysisEngineController
-
getNameFromMetadata
protected java.lang.String getNameFromMetadata()
-
setAnalysisEngineInstancePool
public void setAnalysisEngineInstancePool(AnalysisEngineInstancePool aPool)
- Specified by:
setAnalysisEngineInstancePoolin interfacePrimitiveAnalysisEngineController
-
getServiceInfo
public PrimitiveServiceInfo getServiceInfo()
- Specified by:
getServiceInfoin interfaceAnalysisEngineController- Specified by:
getServiceInfoin interfacePrimitiveAnalysisEngineController
-
stop
public void stop()
Description copied from class:BaseAnalysisEngineControllerStops 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:
stopin interfaceAnalysisEngineController- Overrides:
stopin 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:
dumpStatein interfaceAnalysisEngineController- Specified by:
dumpStatein classBaseAnalysisEngineController
-
-