Package org.apache.uima.aae.controller
Class AggregateAnalysisEngineController_impl
java.lang.Object
org.apache.uima.resource.Resource_ImplBase
org.apache.uima.aae.controller.BaseAnalysisEngineController
org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl
- All Implemented Interfaces:
Serializable,AggregateAnalysisEngineController,AggregateAnalysisEngineController_implMBean,AnalysisEngineController,BaseAnalysisEngineControllerMBean,ControllerLifecycle,EventSubscriber,org.apache.uima.resource.Resource
public class AggregateAnalysisEngineController_impl
extends BaseAnalysisEngineController
implements AggregateAnalysisEngineController, AggregateAnalysisEngineController_implMBean
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.uima.aae.controller.BaseAnalysisEngineController
BaseAnalysisEngineController.ServiceState -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<AnalysisEngineController>protected booleanfinal ObjectFields 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, unregisteredDelegateListFields inherited from interface org.apache.uima.aae.controller.AnalysisEngineController
AEInstanceCount, CasPoolSizeFields 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
ConstructorsConstructorDescriptionAggregateAnalysisEngineController_impl(String anEndpointName, String aDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, Map aDestinationMap) AggregateAnalysisEngineController_impl(AnalysisEngineController aParentController, String anEndpointName, String aDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, Map aDestinationMap) AggregateAnalysisEngineController_impl(AnalysisEngineController aParentController, String anEndpointName, String aDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, Map aDestinationMap, JmxManagement aJmxManagement) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessageOrigin(String aCasReferenceId, Endpoint anEndpoint) voidchangeCollocatedDelegateState(String delegateKey, BaseAnalysisEngineController.ServiceState state) voidcleanUp()voidcollectionProcessComplete(Endpoint anEndpoint) booleancontinueOnError(String aCasReferenceId, String aDelegateKey, Exception anException) booleandelayCasIfDelegateInTimedOutState(String aCasReferenceId, String aDelegateKey) Checks the state of a delegate to see if it is in TIMEOUT State.voiddisableDelegates(List aDelegateList) protected voiddisableDelegates(List aDelegateList, String aCasReferenceId) voiddispatchMetadataRequest(Endpoint anEndpoint) voidvoidvoiddumpState(StringBuffer buffer, String lbl1) voidenableDelegates(List aDelegateList) voidgetDelegateServiceErrors(String aDelegateKey) getDelegateServiceInfo(String aDelegateKey) getDelegateServicePerformance(String aDelegateKey) getLastDelegateKeyFromFlow(String anInputCasReferenceId) getMessageOrigin(String aCasReferenceId) getServiceErrors(String aDelegateKey) getServicePerformance(String aDelegateKey) voidhandleDelegateLifeCycleEvent(String anEndpoint, int aDelegateCount) voidvoidincrementAnalysisTime(long anAnalysisTime) Accumulate analysis time for the aggregatevoidbooleanisDelegateDisabled(String aDelegateKey) booleanisDelegateKeyValid(String aDelegateKey) booleanlookupDelegate(String aDelegateKey) ReturnDelegateobject for a given delegate key.lookUpDelegateKey(String anEndpointName) lookUpDelegateKey(String anEndpointName, String server) Returns a delegate key given an endpoint (queue) name and a server uri.lookUpEndpoint(String anAnalysisEngineKey, boolean clone) voidmapEndpointsToKeys(ConcurrentHashMap aDestinationMap) voidmergeTypeSystem(String aTypeSystem, String fromDestination) voidmergeTypeSystem(String aTypeSystem, String fromDestination, String fromServer) voidForce all collocated delegates to perform any post-initialization steps.voidThis is a process method that is executed for CASes not created by a Multiplier in this aggregate.voidprocess(org.apache.uima.cas.CAS aCAS, String anInputCasReferenceId, String aNewCasReferenceId, String newCASProducedBy) This routine is called to handle CASes produced by a CAS Multiplier.voidprocessCollectionCompleteReplyFromDelegate(String aDelegateKey, boolean sendReply) voidregisterChildController(AnalysisEngineController aChildController, String aDelegateKey) booleanreleaseParentCas(boolean casDropped, boolean clientIsCollocated, LocalCache.CasStateEntry parentCasStateEntry) voidremoveMessageOrigin(String aCasReferenceId) booleanvoidretryLastCommand(int aCommand, Endpoint anEndpoint, String aCasReferenceId) voidretryMetadataRequest(Endpoint anEndpoint) voidretryProcessCASRequest(String aCasReferenceId, Endpoint anEndpoint, boolean addEndpointToCache) voidsaveStatsFromService(String aServiceEndpointName, Map aServiceStats) voidsendMetadata(Endpoint anEndpoint) voidvoidsetCasLoggingDirectory(String key, String directory) voidsetControllerBeanName(String aBeanName) voidsetDescriptor(String descriptor) voidsetFlowControllerDescriptor(String aFlowControllerDescriptor) voidsetMonitor(Monitor monitor) voidvoidsetServiceEndpointName(String anEndpointName) voidstop()Stops input channel(s) and initiates a shutdown of all delegates ( if this is an aggregate ).voidvoidtakeAction(String anAction, String anEndpointName, ErrorContext anErrorContext) Methods inherited from class org.apache.uima.aae.controller.BaseAnalysisEngineController
abortGeneratingCASes, addAbortedCasReferenceId, addControllerCallbackListener, addInputChannel, addServiceInfo, beginProcess, cacheClientEndpoint, changeState, clearStats, 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, 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, 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, toStringMethods inherited from class org.apache.uima.resource.Resource_ImplBase
destroy, getCasManager, getLogger, getMetaData, getRelativePathResolver, getResourceManager, getUimaContext, getUimaContextAdmin, initialize, setLogger, setMetaDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.uima.aae.controller.AggregateAnalysisEngineController
getChildUimaContext, stopCasMultiplierMethods inherited from interface org.apache.uima.aae.controller.AnalysisEngineController
addAbortedCasReferenceId, addInputChannel, addServiceInfo, beginProcess, cacheClientEndpoint, changeState, dropCAS, dropStats, endProcess, forceTimeoutOnPendingCases, getAnalysisTime, getCasManagerWrapper, getCasStatistics, getClientEndpoint, getComponentName, getCpuTime, getDeadClientMap, getErrorHandlerChain, getEventListener, getIdleTime, getIdleTimeBetweenProcessCalls, getIndex, getInProcessCache, getInputChannel, getInputChannel, getJmxContext, getJMXDomain, getKey, getManagementInterface, getName, getOutputChannel, getParentController, getReplyInputChannel, getReplyTime, getServiceErrors, getServicePerformance, getState, getStats, getTime, getTransport, getTransport, getUimaEEAdminContext, getUimaMessageListener, incrementDeserializationTime, incrementSerializationTime, initializeVMTransport, isAwaitingCacheCallbackNotification, isCasMultiplier, isStopped, isTopLevelComponent, notifyListenersWithInitializationStatus, process, quiesceAndStop, registerVmQueueWithJMX, releaseNextCas, saveReplyTime, saveTime, setCasManager, setDeployDescriptor, setInputChannel, setOutputChannel, setStopped, setUimaEEAdminContextMethods inherited from interface org.apache.uima.aae.controller.BaseAnalysisEngineControllerMBean
getBrokerURL, getComponentName, getDeploymentDescriptor, getDeploymentMode, getIdleTime, getInputQueue, getServiceName, getTotalNumberOfCASesDropped, getTotalNumberOfCASesProcessed, getTotalNumberOfCASesReceived, getTotalNumberOfErrors, getTotalTimeSpendDeSerializingCAS, getTotalTimeSpentSerializingCAS, getTotalTimeSpentWaitingForFreeCASInstanceMethods inherited from interface org.apache.uima.aae.controller.ControllerLifecycle
addControllerCallbackListener, removeControllerCallbackListener, terminate
-
Field Details
-
initialized
protected volatile boolean initialized -
childControllerList
-
parallelStepMux
-
-
Constructor Details
-
AggregateAnalysisEngineController_impl
public AggregateAnalysisEngineController_impl(String anEndpointName, String aDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, Map aDestinationMap) throws Exception - Parameters:
anEndpointName-aDescriptor-aCasManager-anInProcessCache-aDestinationMap-- Throws:
Exception
-
AggregateAnalysisEngineController_impl
public AggregateAnalysisEngineController_impl(AnalysisEngineController aParentController, String anEndpointName, String aDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, Map aDestinationMap) throws Exception - Parameters:
aParentController-anEndpointName-aDescriptor-aCasManager-anInProcessCache-aDestinationMap-- Throws:
Exception
-
AggregateAnalysisEngineController_impl
public AggregateAnalysisEngineController_impl(AnalysisEngineController aParentController, String anEndpointName, String aDescriptor, AsynchAECasManager aCasManager, InProcessCache anInProcessCache, Map aDestinationMap, JmxManagement aJmxManagement) throws Exception - Throws:
Exception
-
-
Method Details
-
registerChildController
public void registerChildController(AnalysisEngineController aChildController, String aDelegateKey) throws Exception - Specified by:
registerChildControllerin interfaceAggregateAnalysisEngineController- Throws:
Exception
-
saveStatsFromService
- Specified by:
saveStatsFromServicein interfaceAggregateAnalysisEngineController
-
addMessageOrigin
- Specified by:
addMessageOriginin interfaceAggregateAnalysisEngineController
-
isDelegateDisabled
- Specified by:
isDelegateDisabledin interfaceAggregateAnalysisEngineController
-
setServiceEndpointName
- Parameters:
anEndpointName-
-
getServiceEndpointName
- Specified by:
getServiceEndpointNamein interfaceAnalysisEngineController
-
setControllerBeanName
- Parameters:
aBeanName-
-
getMessageOrigin
- Specified by:
getMessageOriginin interfaceAggregateAnalysisEngineController
-
removeMessageOrigin
- Specified by:
removeMessageOriginin interfaceAggregateAnalysisEngineController
-
dropCAS
- Specified by:
dropCASin interfaceAnalysisEngineController- Overrides:
dropCASin classBaseAnalysisEngineController
-
dropFlow
- Specified by:
dropFlowin interfaceAggregateAnalysisEngineController
-
mapEndpointsToKeys
- Specified by:
mapEndpointsToKeysin interfaceAggregateAnalysisEngineController
-
getDelegateStats
- Specified by:
getDelegateStatsin interfaceAggregateAnalysisEngineController
-
processCollectionCompleteReplyFromDelegate
public void processCollectionCompleteReplyFromDelegate(String aDelegateKey, boolean sendReply) throws AsynchAEException - Specified by:
processCollectionCompleteReplyFromDelegatein interfaceAggregateAnalysisEngineController- Throws:
AsynchAEException
-
setFlowControllerDescriptor
- Parameters:
aFlowControllerDescriptor-
-
takeAction
- Specified by:
takeActionin interfaceAnalysisEngineController
-
collectionProcessComplete
- Specified by:
collectionProcessCompletein interfaceAnalysisEngineController- Throws:
AsynchAEException
-
getDescriptor
-
setDescriptor
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitivein interfaceAnalysisEngineController
-
getDestinations
- Specified by:
getDestinationsin interfaceAggregateAnalysisEngineController
-
enableDelegates
- Specified by:
enableDelegatesin interfaceAggregateAnalysisEngineController- Throws:
AsynchAEException
-
handleInitializationError
-
disableDelegates
- Specified by:
disableDelegatesin interfaceAggregateAnalysisEngineController- Throws:
AsynchAEException
-
disableDelegates
protected void disableDelegates(List aDelegateList, String aCasReferenceId) throws AsynchAEException - Throws:
AsynchAEException
-
continueOnError
public boolean continueOnError(String aCasReferenceId, String aDelegateKey, Exception anException) throws AsynchAEException - Specified by:
continueOnErrorin interfaceAggregateAnalysisEngineController- Throws:
AsynchAEException
-
getLastDelegateKeyFromFlow
- Specified by:
getLastDelegateKeyFromFlowin interfaceAggregateAnalysisEngineController
-
process
public void process(org.apache.uima.cas.CAS aCAS, String anInputCasReferenceId, String aNewCasReferenceId, String newCASProducedBy) This routine is called to handle CASes produced by a CAS Multiplier. A new CAS needs a flow object which is produced here from the Flow associated with the input CAS. Once the subflow is computed, it is cached for future use.- Specified by:
processin interfaceAnalysisEngineController- Overrides:
processin classBaseAnalysisEngineController- Parameters:
aCAS- - CAS to processanInputCasReferenceId- - reference id of the input CASaNewCasReferenceId- - reference id of the CAS created by the CAS multipliernewCASProducedBy- - name of the multiplier that created the CAS- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionAsynchAEException
-
process
This is a process method that is executed for CASes not created by a Multiplier in this aggregate.- Specified by:
processin interfaceAnalysisEngineController- Overrides:
processin classBaseAnalysisEngineController
-
sendRequestForMetadataToRemoteDelegates
- Specified by:
sendRequestForMetadataToRemoteDelegatesin interfaceAggregateAnalysisEngineController- Throws:
AsynchAEException
-
finalStep
- Specified by:
finalStepin interfaceAggregateAnalysisEngineController
-
releaseParentCas
public boolean releaseParentCas(boolean casDropped, boolean clientIsCollocated, LocalCache.CasStateEntry parentCasStateEntry) -
delayCasIfDelegateInTimedOutState
public boolean delayCasIfDelegateInTimedOutState(String aCasReferenceId, String aDelegateKey) throws AsynchAEException Checks the state of a delegate to see if it is in TIMEOUT State. If it is, push the CAS id onto a list of CASes pending dispatch. The delegate is in a questionable state and the aggregate sends a ping message to check delegate's availability. If the delegate responds to the ping, all CASes in the pending dispatch list will be immediately dispatched.- Specified by:
delayCasIfDelegateInTimedOutStatein interfaceAggregateAnalysisEngineController- Throws:
AsynchAEException
-
retryProcessCASRequest
public void retryProcessCASRequest(String aCasReferenceId, Endpoint anEndpoint, boolean addEndpointToCache) throws AsynchAEException - Specified by:
retryProcessCASRequestin interfaceAggregateAnalysisEngineController- Throws:
AsynchAEException
-
isDelegateKeyValid
- Specified by:
isDelegateKeyValidin interfaceAggregateAnalysisEngineController
-
lookUpDelegateKey
- Specified by:
lookUpDelegateKeyin interfaceAggregateAnalysisEngineController
-
lookUpDelegateKey
Returns a delegate key given an endpoint (queue) name and a server uri. If a server is null, only the endpoint name will be used for matching.- Specified by:
lookUpDelegateKeyin interfaceAggregateAnalysisEngineController
-
lookUpEndpoint
- Specified by:
lookUpEndpointin interfaceAggregateAnalysisEngineController- Throws:
AsynchAEException
-
getDelegateServiceInfo
- Specified by:
getDelegateServiceInfoin interfaceAggregateAnalysisEngineController
-
getDelegateServicePerformance
- Specified by:
getDelegateServicePerformancein interfaceAggregateAnalysisEngineController
-
getDelegateServiceErrors
- Specified by:
getDelegateServiceErrorsin interfaceAggregateAnalysisEngineController
-
mergeTypeSystem
- Specified by:
mergeTypeSystemin interfaceAggregateAnalysisEngineController- Throws:
AsynchAEException
-
mergeTypeSystem
public void mergeTypeSystem(String aTypeSystem, String fromDestination, String fromServer) throws AsynchAEException - Specified by:
mergeTypeSystemin interfaceAggregateAnalysisEngineController- Throws:
AsynchAEException
-
initialize
- Specified by:
initializein interfaceAnalysisEngineController- Throws:
AsynchAEException
-
dispatchMetadataRequest
- Specified by:
dispatchMetadataRequestin interfaceAggregateAnalysisEngineController- Throws:
AsynchAEException
-
retryMetadataRequest
- Specified by:
retryMetadataRequestin interfaceAggregateAnalysisEngineController- Throws:
AsynchAEException
-
sendMetadata
- Specified by:
sendMetadatain interfaceAnalysisEngineController
-
getControllerLatch
- Specified by:
getControllerLatchin interfaceAnalysisEngineController
-
getMonitor
- Specified by:
getMonitorin interfaceAnalysisEngineController
-
setMonitor
-
handleDelegateLifeCycleEvent
- Specified by:
handleDelegateLifeCycleEventin interfaceAnalysisEngineController
-
retryLastCommand
- Specified by:
retryLastCommandin interfaceAggregateAnalysisEngineController
-
getServiceErrors
-
getServiceInfo
- Specified by:
getServiceInfoin interfaceAggregateAnalysisEngineController- Specified by:
getServiceInfoin interfaceAnalysisEngineController
-
getServicePerformance
- Specified by:
getServicePerformancein interfaceAggregateAnalysisEngineController
-
incrementAnalysisTime
public void incrementAnalysisTime(long anAnalysisTime) Accumulate analysis time for the aggregate- Parameters:
anAnalysisTime-
-
stopTimers
public void stopTimers()- Specified by:
stopTimersin interfaceAggregateAnalysisEngineController
-
requestForMetaSentToRemotes
public boolean requestForMetaSentToRemotes()- Specified by:
requestForMetaSentToRemotesin interfaceAggregateAnalysisEngineController
-
setRequestForMetaSentToRemotes
public void setRequestForMetaSentToRemotes()- Specified by:
setRequestForMetaSentToRemotesin interfaceAggregateAnalysisEngineController
-
cleanUp
public void cleanUp()- Overrides:
cleanUpin classBaseAnalysisEngineController
-
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
-
getChildControllerList
- Specified by:
getChildControllerListin interfaceAggregateAnalysisEngineController
-
onInitialize
public void onInitialize()Force all collocated delegates to perform any post-initialization steps.- Specified by:
onInitializein interfaceAnalysisEngineController
-
changeCollocatedDelegateState
public void changeCollocatedDelegateState(String delegateKey, BaseAnalysisEngineController.ServiceState state) throws Exception - Specified by:
changeCollocatedDelegateStatein interfaceAggregateAnalysisEngineController- Throws:
Exception
-
dumpState
- Specified by:
dumpStatein interfaceAnalysisEngineController- Specified by:
dumpStatein classBaseAnalysisEngineController
-
getLocalCache
- Specified by:
getLocalCachein interfaceAnalysisEngineController- Overrides:
getLocalCachein classBaseAnalysisEngineController
-
lookupDelegate
ReturnDelegateobject for a given delegate key.- Specified by:
lookupDelegatein interfaceAggregateAnalysisEngineController
-
setCasLoggingDirectory
- Specified by:
setCasLoggingDirectoryin interfaceAggregateAnalysisEngineController
-