com.espertech.esper.core.context.mgr
Class ContextManagerImpl
java.lang.Object
com.espertech.esper.core.context.mgr.ContextManagerImpl
- All Implemented Interfaces:
- ContextControllerLifecycleCallback, ContextManager, ContextIteratorHandler, FilterFaultHandler
public class ContextManagerImpl
- extends java.lang.Object
- implements ContextManager, ContextControllerLifecycleCallback, ContextIteratorHandler, FilterFaultHandler
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> agentInstancesCollected)
|
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 selector)
|
ContextDescriptor |
getContextDescriptor()
|
FilterSpecLookupable |
getFilterLookupable(EventType eventType)
|
int |
getNumNestingLevels()
|
java.util.Map<java.lang.String,ContextControllerStatementDesc> |
getStatements()
|
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)
|
protected static void |
setState(java.util.Map<java.lang.Integer,ContextPartitionDescriptor> original,
ContextPartitionState state)
|
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 |
ContextManagerImpl
public ContextManagerImpl(ContextControllerFactoryServiceContext factoryServiceContext)
throws ExprValidationException
- Throws:
ExprValidationException
getNumNestingLevels
public int getNumNestingLevels()
- Specified by:
getNumNestingLevels
in interface ContextManager
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
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
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
contextPartitionTerminate
public void contextPartitionTerminate(ContextControllerInstanceHandle contextNestedHandle,
java.util.Map<java.lang.String,java.lang.Object> terminationProperties,
boolean leaveLocksAcquired,
java.util.List<AgentInstance> agentInstancesCollected)
- Specified by:
contextPartitionTerminate
in interface ContextControllerLifecycleCallback
contextPartitionNavigate
public void contextPartitionNavigate(ContextControllerInstanceHandle existingHandle,
ContextController originator,
ContextControllerState controllerState,
int exportedCPOrPathId,
ContextInternalFilterAddendum filterAddendum,
AgentInstanceSelector agentInstanceSelector,
byte[] payload)
- Specified by:
contextPartitionNavigate
in interface ContextControllerLifecycleCallback
getFilterLookupable
public FilterSpecLookupable getFilterLookupable(EventType eventType)
- Specified by:
getFilterLookupable
in interface ContextManager
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
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 selector)
- Specified by:
getAgentInstanceIds
in interface ContextManager
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
importStartPaths
public void importStartPaths(ContextControllerState state,
AgentInstanceSelector agentInstanceSelector)
- Specified by:
importStartPaths
in interface ContextManager
handleFilterFault
public boolean handleFilterFault(EventBean theEvent,
long version)
- Specified by:
handleFilterFault
in interface FilterFaultHandler
setState
protected static void setState(java.util.Map<java.lang.Integer,ContextPartitionDescriptor> original,
ContextPartitionState state)