com.espertech.esper.core.context.mgr
Class ContextManagerNested

java.lang.Object
  extended by com.espertech.esper.core.context.mgr.ContextManagerNested
All Implemented Interfaces:
ContextControllerLifecycleCallback, ContextManager, ContextIteratorHandler, FilterFaultHandler

public class ContextManagerNested
extends java.lang.Object
implements ContextManager, ContextControllerLifecycleCallback, ContextIteratorHandler, FilterFaultHandler


Constructor Summary
ContextManagerNested(ContextControllerFactoryServiceContext factoryServiceContext)
           
 
Method Summary
 void addStatement(ContextControllerStatementBase statement, boolean isRecoveringResilient)
           
 ContextControllerInstanceHandle contextPartitionInstantiate(java.lang.Integer optionalContextPartitionId, int subPathId, java.lang.Integer importSubpathId, ContextController originator, EventBean optionalTriggeringEvent, java.util.Map<java.lang.String,java.lang.Object> optionalTriggeringPattern, java.lang.Object partitionKey, java.util.Map<java.lang.String,java.lang.Object> contextProperties, ContextControllerState states, ContextInternalFilterAddendum filterAddendum, boolean isRecoveringResilient, ContextPartitionState state)
           
 void contextPartitionNavigate(ContextControllerInstanceHandle existingHandle, ContextController originator, ContextControllerState controllerState, int exportedCPOrPathId, ContextInternalFilterAddendum filterAddendum, AgentInstanceSelector agentInstanceSelector, byte[] payload)
           
 void contextPartitionTerminate(ContextControllerInstanceHandle contextNestedHandle, java.util.Map<java.lang.String,java.lang.Object> terminationProperties, boolean leaveLocksAcquired, java.util.List<AgentInstance> agentInstances)
          Provides the sub-context that ends.
 void destroyStatement(java.lang.String statementName, java.lang.String statementId)
           
 ContextStatePathDescriptor extractDestroyPaths(ContextPartitionSelector selector)
           
 ContextStatePathDescriptor extractPaths(ContextPartitionSelector selector)
           
 ContextStatePathDescriptor extractStopPaths(ContextPartitionSelector selector)
           
 java.util.Collection<java.lang.Integer> getAgentInstanceIds(ContextPartitionSelector contextPartitionSelector)
           
 ContextDescriptor getContextDescriptor()
           
 ContextPartitionVisitorStateWithPath getContextPartitionPathsInternal(ContextPartitionSelector selector)
           
 FilterSpecLookupable getFilterLookupable(EventType eventType)
           
 int getNumNestingLevels()
           
 java.util.Map<java.lang.String,ContextControllerStatementDesc> getStatements()
           
protected static ContextPartitionIdentifier[] getTreeCompositeKey(ContextControllerFactory[] nestedContextFactories, java.lang.Object initPartitionKey, ContextControllerTreeEntry treeEntry, java.util.Map<ContextController,ContextControllerTreeEntry> subcontexts)
           
 boolean handleFilterFault(EventBean theEvent, long version)
           
 void importStartPaths(ContextControllerState state, AgentInstanceSelector agentInstanceSelector)
           
 java.util.Iterator<EventBean> iterator(java.lang.String statementId)
           
 java.util.Iterator<EventBean> iterator(java.lang.String statementId, ContextPartitionSelector selector)
           
 void safeDestroy()
           
 SafeIterator<EventBean> safeIterator(java.lang.String statementId)
           
 SafeIterator<EventBean> safeIterator(java.lang.String statementId, ContextPartitionSelector selector)
           
 java.util.Map<java.lang.Integer,ContextPartitionDescriptor> startPaths(ContextPartitionSelector selector)
           
 void stopStatement(java.lang.String statementName, java.lang.String statementId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextManagerNested

public ContextManagerNested(ContextControllerFactoryServiceContext factoryServiceContext)
                     throws ExprValidationException
Throws:
ExprValidationException
Method Detail

getStatements

public java.util.Map<java.lang.String,ContextControllerStatementDesc> getStatements()
Specified by:
getStatements in interface ContextManager

getContextDescriptor

public ContextDescriptor getContextDescriptor()
Specified by:
getContextDescriptor in interface ContextManager

getNumNestingLevels

public int getNumNestingLevels()
Specified by:
getNumNestingLevels in interface ContextManager

iterator

public java.util.Iterator<EventBean> iterator(java.lang.String statementId,
                                              ContextPartitionSelector selector)
Specified by:
iterator in interface ContextIteratorHandler

safeIterator

public SafeIterator<EventBean> safeIterator(java.lang.String statementId,
                                            ContextPartitionSelector selector)
Specified by:
safeIterator in interface ContextIteratorHandler

getAgentInstanceIds

public java.util.Collection<java.lang.Integer> getAgentInstanceIds(ContextPartitionSelector contextPartitionSelector)
Specified by:
getAgentInstanceIds in interface ContextManager

importStartPaths

public void importStartPaths(ContextControllerState state,
                             AgentInstanceSelector agentInstanceSelector)
Specified by:
importStartPaths in interface ContextManager

getTreeCompositeKey

protected static ContextPartitionIdentifier[] getTreeCompositeKey(ContextControllerFactory[] nestedContextFactories,
                                                                  java.lang.Object initPartitionKey,
                                                                  ContextControllerTreeEntry treeEntry,
                                                                  java.util.Map<ContextController,ContextControllerTreeEntry> subcontexts)

extractPaths

public ContextStatePathDescriptor extractPaths(ContextPartitionSelector selector)
Specified by:
extractPaths in interface ContextManager

extractStopPaths

public ContextStatePathDescriptor extractStopPaths(ContextPartitionSelector selector)
Specified by:
extractStopPaths in interface ContextManager

extractDestroyPaths

public ContextStatePathDescriptor extractDestroyPaths(ContextPartitionSelector selector)
Specified by:
extractDestroyPaths in interface ContextManager

startPaths

public java.util.Map<java.lang.Integer,ContextPartitionDescriptor> startPaths(ContextPartitionSelector selector)
Specified by:
startPaths in interface ContextManager

getContextPartitionPathsInternal

public ContextPartitionVisitorStateWithPath getContextPartitionPathsInternal(ContextPartitionSelector selector)

addStatement

public void addStatement(ContextControllerStatementBase statement,
                         boolean isRecoveringResilient)
                  throws ExprValidationException
Specified by:
addStatement in interface ContextManager
Throws:
ExprValidationException

stopStatement

public void stopStatement(java.lang.String statementName,
                          java.lang.String statementId)
Specified by:
stopStatement in interface ContextManager

destroyStatement

public void destroyStatement(java.lang.String statementName,
                             java.lang.String statementId)
Specified by:
destroyStatement in interface ContextManager

safeDestroy

public void safeDestroy()
Specified by:
safeDestroy in interface ContextManager

getFilterLookupable

public FilterSpecLookupable getFilterLookupable(EventType eventType)
Specified by:
getFilterLookupable in interface ContextManager

contextPartitionNavigate

public void contextPartitionNavigate(ContextControllerInstanceHandle existingHandle,
                                     ContextController originator,
                                     ContextControllerState controllerState,
                                     int exportedCPOrPathId,
                                     ContextInternalFilterAddendum filterAddendum,
                                     AgentInstanceSelector agentInstanceSelector,
                                     byte[] payload)
Specified by:
contextPartitionNavigate in interface ContextControllerLifecycleCallback

contextPartitionInstantiate

public ContextControllerInstanceHandle contextPartitionInstantiate(java.lang.Integer optionalContextPartitionId,
                                                                   int subPathId,
                                                                   java.lang.Integer importSubpathId,
                                                                   ContextController originator,
                                                                   EventBean optionalTriggeringEvent,
                                                                   java.util.Map<java.lang.String,java.lang.Object> optionalTriggeringPattern,
                                                                   java.lang.Object partitionKey,
                                                                   java.util.Map<java.lang.String,java.lang.Object> contextProperties,
                                                                   ContextControllerState states,
                                                                   ContextInternalFilterAddendum filterAddendum,
                                                                   boolean isRecoveringResilient,
                                                                   ContextPartitionState state)
Specified by:
contextPartitionInstantiate in interface ContextControllerLifecycleCallback

handleFilterFault

public boolean handleFilterFault(EventBean theEvent,
                                 long version)
Specified by:
handleFilterFault in interface FilterFaultHandler

contextPartitionTerminate

public void contextPartitionTerminate(ContextControllerInstanceHandle contextNestedHandle,
                                      java.util.Map<java.lang.String,java.lang.Object> terminationProperties,
                                      boolean leaveLocksAcquired,
                                      java.util.List<AgentInstance> agentInstances)
Provides the sub-context that ends.

Specified by:
contextPartitionTerminate in interface ContextControllerLifecycleCallback

iterator

public java.util.Iterator<EventBean> iterator(java.lang.String statementId)
Specified by:
iterator in interface ContextIteratorHandler

safeIterator

public SafeIterator<EventBean> safeIterator(java.lang.String statementId)
Specified by:
safeIterator in interface ContextIteratorHandler

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com