Interface EPContextPartitionService
public interface EPContextPartitionService
Service interface for administration of contexts and context partitions.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addContextPartitionStateListener
(String deploymentId, String contextName, ContextPartitionStateListener listener) Add context partition state listener for the given contextvoid
addContextStateListener
(ContextStateListener listener) Add a context state listenerint
getContextNestingLevel
(String deploymentId, String contextName) Returns the nesting level for the context declaration, i.e.long
getContextPartitionCount
(String deploymentId, String contextName) Returns the current count of context partition.getContextPartitionIds
(String deploymentId, String contextName, ContextPartitionSelector selector) Returns the context partition ids.getContextPartitions
(String deploymentId, String contextName, ContextPartitionSelector selector) Returns information about selected context partitions including state.getContextPartitionStateListeners
(String deploymentId, String contextName) Returns an iterator of context partition state listeners (read-only) for the given contextgetContextProperties
(String deploymentId, String contextName, int contextPartitionId) Returns the context properties for a given deployment id, context name and context partition id.Returns an iterator of context state listeners (read-only)String[]
getContextStatementNames
(String deploymentId, String contextName) Returns the statement names associated to the context of the given name.getIdentifier
(String deploymentId, String contextName, int agentInstanceId) Returning the descriptor of a given context partition.void
removeContextPartitionStateListener
(String deploymentId, String contextName, ContextPartitionStateListener listener) Remove a context partition state listener for the given contextvoid
removeContextPartitionStateListeners
(String deploymentId, String contextName) Removes all context partition state listener for the given contextvoid
Remove a context state listenervoid
Removes all context state listener
-
Method Details
-
getContextStatementNames
Returns the statement names associated to the context of the given name.Returns null if a context declaration for the name does not exist.
- Parameters:
deploymentId
- deployment id of context (deployment id of create-context statement)contextName
- context name to return statements for- Returns:
- statement names, or null if the context does not exist, or empty list if no statements are associated to the context (counting started and stopped statements, not destroyed ones).
-
getContextNestingLevel
Returns the nesting level for the context declaration, i.e. 1 for unnested and >1 for nested contexts.- Parameters:
deploymentId
- deployment id of context (deployment id of create-context statement)contextName
- context name- Returns:
- nesting level
- Throws:
IllegalArgumentException
- if a context by that name was not declared
-
getContextPartitions
ContextPartitionCollection getContextPartitions(String deploymentId, String contextName, ContextPartitionSelector selector) Returns information about selected context partitions including state.- Parameters:
deploymentId
- deployment id of context (deployment id of create-context statement)contextName
- context nameselector
- a selector that identifies the context partitions- Returns:
- collection of the context partition ids and descriptors
- Throws:
IllegalArgumentException
- if a context by that name was not declaredInvalidContextPartitionSelector
- if the selector type and context declaration mismatch
-
getContextPartitionIds
Set<Integer> getContextPartitionIds(String deploymentId, String contextName, ContextPartitionSelector selector) Returns the context partition ids.- Parameters:
deploymentId
- deployment id of context (deployment id of create-context statement)contextName
- context nameselector
- a selector that identifies the context partitions- Returns:
- set of the context partition ids
- Throws:
IllegalArgumentException
- if a context by that name was not declaredInvalidContextPartitionSelector
- if the selector type and context declaration mismatch
-
getContextPartitionCount
Returns the current count of context partition.- Parameters:
deploymentId
- deployment id of context (deployment id of create-context statement)contextName
- context name- Returns:
- context partition count
- Throws:
IllegalArgumentException
- if a context by that name was not declared
-
getIdentifier
ContextPartitionIdentifier getIdentifier(String deploymentId, String contextName, int agentInstanceId) Returning the descriptor of a given context partition.- Parameters:
deploymentId
- deployment id of context (deployment id of create-context statement)contextName
- context nameagentInstanceId
- the context partition id number- Returns:
- identifier or null if the context partition is not found
- Throws:
IllegalArgumentException
- if a context by that name was not declared
-
addContextStateListener
Add a context state listener- Parameters:
listener
- to add
-
removeContextStateListener
Remove a context state listener- Parameters:
listener
- to remove
-
getContextStateListeners
Iterator<ContextStateListener> getContextStateListeners()Returns an iterator of context state listeners (read-only)- Returns:
- listeners
-
removeContextStateListeners
void removeContextStateListeners()Removes all context state listener -
addContextPartitionStateListener
void addContextPartitionStateListener(String deploymentId, String contextName, ContextPartitionStateListener listener) Add context partition state listener for the given context- Parameters:
deploymentId
- deployment id of context (deployment id of create-context statement)contextName
- context namelistener
- to add
-
removeContextPartitionStateListener
void removeContextPartitionStateListener(String deploymentId, String contextName, ContextPartitionStateListener listener) Remove a context partition state listener for the given context- Parameters:
deploymentId
- deployment id of context (deployment id of create-context statement)contextName
- context namelistener
- to remove
-
getContextPartitionStateListeners
Iterator<ContextPartitionStateListener> getContextPartitionStateListeners(String deploymentId, String contextName) Returns an iterator of context partition state listeners (read-only) for the given context- Parameters:
deploymentId
- deployment id of context (deployment id of create-context statement)contextName
- context name- Returns:
- listeners
-
removeContextPartitionStateListeners
Removes all context partition state listener for the given context- Parameters:
deploymentId
- deployment id of context (deployment id of create-context statement)contextName
- context name
-
getContextProperties
Map<String,Object> getContextProperties(String deploymentId, String contextName, int contextPartitionId) Returns the context properties for a given deployment id, context name and context partition id.- Parameters:
deploymentId
- deployment id of context (deployment id of create-context statement)contextName
- context namecontextPartitionId
- context partition id- Returns:
- map of built-in properties wherein values representing event are EventBean instances
-