com.espertech.esper.epl.variable
Interface VariableStateHandler


public interface VariableStateHandler

Interface for a plug-in to VariableService to handle variable persistent state.


Method Summary
 Pair<java.lang.Boolean,java.lang.Object> getHasState(java.lang.String variableName, int variableNumber, int agentInstanceId, java.lang.Class type, EventType eventType, StatementExtensionSvcContext statementExtContext)
          Returns the current variable state plus Boolean.TRUE if there is a current state since the variable may have the value of null; returns Boolean.FALSE and null if there is no current state
 void removeState(java.lang.String variableName, int variableNumber, int agentInstanceId)
           
 void removeVariable(java.lang.String name, java.util.Set<java.lang.Integer> cps)
           
 void setState(java.lang.String variableName, int variableNumber, int agentInstanceId, java.lang.Object newValue)
          Sets the new variable value
 

Method Detail

getHasState

Pair<java.lang.Boolean,java.lang.Object> getHasState(java.lang.String variableName,
                                                     int variableNumber,
                                                     int agentInstanceId,
                                                     java.lang.Class type,
                                                     EventType eventType,
                                                     StatementExtensionSvcContext statementExtContext)
Returns the current variable state plus Boolean.TRUE if there is a current state since the variable may have the value of null; returns Boolean.FALSE and null if there is no current state

Parameters:
variableName - variable name
variableNumber - number of the variable
type - type of the variable
eventType - event type or null if not a variable that represents an event
statementExtContext - for caches etc.
Returns:
indicator whether the variable is known and it's state, or whether it doesn't have state (false)

setState

void setState(java.lang.String variableName,
              int variableNumber,
              int agentInstanceId,
              java.lang.Object newValue)
Sets the new variable value

Parameters:
variableName - name of the variable
variableNumber - number of the variable
newValue - new variable value, null values allowed

removeState

void removeState(java.lang.String variableName,
                 int variableNumber,
                 int agentInstanceId)

removeVariable

void removeVariable(java.lang.String name,
                    java.util.Set<java.lang.Integer> cps)

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