Class VariableReadWritePackage

java.lang.Object
com.espertech.esper.common.internal.epl.variable.core.VariableReadWritePackage

public class VariableReadWritePackage extends Object
A convenience class for dealing with reading and updating multiple variable values.
  • Field Details

  • Constructor Details

    • VariableReadWritePackage

      public VariableReadWritePackage()
  • Method Details

    • setCopyMethods

      public void setCopyMethods(Map<EventTypeSPI,EventBeanCopyMethod> copyMethods)
    • setAssignments

      public void setAssignments(VariableTriggerSetDesc[] assignments)
    • setWriters

      public void setWriters(VariableTriggerWrite[] writers)
    • setVariables

      public void setVariables(Variable[] variables)
    • setMustCoerce

      public void setMustCoerce(boolean[] mustCoerce)
    • setReadersForGlobalVars

      public void setReadersForGlobalVars(VariableReader[] readersForGlobalVars)
    • writeVariables

      public void writeVariables(EventBean[] eventsPerStream, Map<String,Object> valuesWritten, ExprEvaluatorContext exprEvaluatorContext)
      Write new variable values and commit, evaluating assignment expressions using the given events per stream.

      Populates an optional map of new values if a non-null map is passed.

      Parameters:
      eventsPerStream - events per stream
      valuesWritten - null or an empty map to populate with written values
      exprEvaluatorContext - expression evaluation context
    • iterate

      public Map<String,Object> iterate(VariableManagementService variableManagementService, int agentInstanceId)
      Iterate returning all values.
      Parameters:
      variableManagementService - variable management
      agentInstanceId - context partition id
      Returns:
      map of values