public interface EPVariableService
Modifier and Type | Method and Description |
---|---|
Map<DeploymentIdNamePair,Object> |
getVariableValue(Set<DeploymentIdNamePair> variableNames)
Returns current variable values for each of the global variable names passed in,
guaranteeing consistency in the face of concurrent updates to the variables.
|
Map<DeploymentIdNamePair,List<ContextPartitionVariableState>> |
getVariableValue(Set<DeploymentIdNamePair> variableNames,
ContextPartitionSelector contextPartitionSelector)
Returns the current variable values for a context-partitioned variable, per context partition.
|
Object |
getVariableValue(String deploymentId,
String variableName)
Returns the current variable value for a global variable.
|
Map<DeploymentIdNamePair,Object> |
getVariableValueAll()
Returns current variable values for all global variables,
guaranteeing consistency in the face of concurrent updates to the variables.
|
void |
setVariableValue(Map<DeploymentIdNamePair,Object> variableValues)
Sets the value of multiple global variables in one update, applying all or none of the changes
to variable values in one atomic transaction.
|
void |
setVariableValue(Map<DeploymentIdNamePair,Object> variableValues,
int agentInstanceId)
Sets the value of multiple context-partitioned variables in one update, applying all or none of the changes
to variable values in one atomic transaction.
|
void |
setVariableValue(String deploymentId,
String variableName,
Object variableValue)
Sets the value of a single global variable.
|
Object getVariableValue(String deploymentId, String variableName) throws VariableNotFoundException
deploymentId
- deployment idvariableName
- is the name of the variable to return the value forVariableNotFoundException
- if a variable by that name has not been declaredMap<DeploymentIdNamePair,List<ContextPartitionVariableState>> getVariableValue(Set<DeploymentIdNamePair> variableNames, ContextPartitionSelector contextPartitionSelector) throws VariableNotFoundException
variableNames
- are the names of the variables to return the value forcontextPartitionSelector
- selector for the context partition to return the value forVariableNotFoundException
- if a variable by that name has not been declaredMap<DeploymentIdNamePair,Object> getVariableValue(Set<DeploymentIdNamePair> variableNames) throws VariableNotFoundException
variableNames
- is a set of variable names for which to return valuesVariableNotFoundException
- if any of the variable names has not been declaredMap<DeploymentIdNamePair,Object> getVariableValueAll()
void setVariableValue(String deploymentId, String variableName, Object variableValue) throws VariableValueException, VariableNotFoundException
Note that the thread setting the variable value queues the changes, i.e. it does not itself re-evaluate such new variable value for any given statement. The timer thread performs this work.
Not for use with context-partitioned variables.deploymentId
- deployment idvariableName
- is the name of the variable to change the value ofvariableValue
- is the new value of the variable, with null an allowed valueVariableValueException
- if the value does not match variable type or cannot be safely coerced
to the variable typeVariableNotFoundException
- if the variable name has not been declaredvoid setVariableValue(Map<DeploymentIdNamePair,Object> variableValues) throws VariableValueException, VariableNotFoundException
Note that the thread setting the variable value queues the changes, i.e. it does not itself re-evaluate such new variable value for any given statement. The timer thread performs this work.
Not for use with context-partitioned variables.variableValues
- is the map of variable name and variable value, with null an allowed valueVariableValueException
- if any value does not match variable type or cannot be safely coerced
to the variable typeVariableNotFoundException
- if any of the variable names has not been declaredvoid setVariableValue(Map<DeploymentIdNamePair,Object> variableValues, int agentInstanceId) throws VariableValueException, VariableNotFoundException
Note that the thread setting the variable value queues the changes, i.e. it does not itself re-evaluate such new variable value for any given statement. The timer thread performs this work.
Only for use with context-partitioned variables.variableValues
- is the map of variable name and variable value, with null an allowed valueagentInstanceId
- the id of the context partitionVariableValueException
- if any value does not match variable type or cannot be safely coerced
to the variable typeVariableNotFoundException
- if any of the variable names has not been declaredCopyright © 2005–2018. All rights reserved.