com.espertech.esper.epl.variable
Class VariableReader

java.lang.Object
  extended by com.espertech.esper.epl.variable.VariableReader

public class VariableReader
extends java.lang.Object

Reads and writes variable values.

Works closely with VariableService in determining the version to read.


Constructor Summary
VariableReader(VariableMetaData variableMetaData, VariableVersionThreadLocal versionThreadLocal, VersionedValueList<java.lang.Object> versionsLow)
           
 
Method Summary
 java.lang.Object getValue()
          Returns the value of a variable.
 VariableMetaData getVariableMetaData()
           
 VersionedValueList<java.lang.Object> getVersionsLow()
           
 void setVersionsHigh(VersionedValueList<java.lang.Object> versionsHigh)
          For roll-over (overflow) in version numbers, sets a new collection of versioned-values for the variable to use when requests over the version rollover boundary are made.
 void setVersionsLow(VersionedValueList<java.lang.Object> versionsLow)
          Sets a new list of versioned-values to inquire against, for use when version numbers roll-over.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableReader

public VariableReader(VariableMetaData variableMetaData,
                      VariableVersionThreadLocal versionThreadLocal,
                      VersionedValueList<java.lang.Object> versionsLow)
Method Detail

setVersionsHigh

public void setVersionsHigh(VersionedValueList<java.lang.Object> versionsHigh)
For roll-over (overflow) in version numbers, sets a new collection of versioned-values for the variable to use when requests over the version rollover boundary are made.

Parameters:
versionsHigh - the list of versions for roll-over

setVersionsLow

public void setVersionsLow(VersionedValueList<java.lang.Object> versionsLow)
Sets a new list of versioned-values to inquire against, for use when version numbers roll-over.

Parameters:
versionsLow - the list of versions for read

getValue

public java.lang.Object getValue()
Returns the value of a variable.

Considers the version set via thread-local for the thread's atomic read of variable values.

Returns:
value of variable at the version applicable for the thead

getVariableMetaData

public VariableMetaData getVariableMetaData()

getVersionsLow

public VersionedValueList<java.lang.Object> getVersionsLow()

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