public interface VariableService
See implementation class for further details.
Modifier and Type | Method and Description |
---|---|
void |
allocateVariableState(java.lang.String variableName,
int agentInstanceId,
StatementExtensionSvcContext extensionServicesContext,
boolean isRecoveringResilient) |
void |
checkAndWrite(java.lang.String variableName,
int agentInstanceId,
java.lang.Object newValue)
Check type of the value supplied and writes the new variable value.
|
void |
commit()
Commits the variable outstanding changes.
|
void |
createNewVariable(java.lang.String optionalContextName,
java.lang.String variableName,
java.lang.String type,
boolean constant,
boolean array,
boolean arrayOfPrimitive,
java.lang.Object value,
EngineImportService engineImportService) |
void |
deallocateVariableState(java.lang.String variableName,
int agentInstanceId) |
void |
destroy() |
VariableReader |
getReader(java.lang.String variableName,
int agentInstanceIdAccessor)
Returns a reader that provides access to variable values.
|
java.util.concurrent.ConcurrentHashMap<java.lang.Integer,VariableReader> |
getReadersPerCP(java.lang.String variableName) |
java.util.concurrent.locks.ReadWriteLock |
getReadWriteLock()
Lock for use in atomic writes to the variable space.
|
VariableMetaData |
getVariableMetaData(java.lang.String variableName) |
java.util.Map<java.lang.String,VariableReader> |
getVariableReadersNonCP()
Returns a map of variable name and reader, for thread-safe iteration.
|
java.lang.String |
isContextVariable(java.lang.String propertyName) |
void |
registerCallback(java.lang.String variableName,
int agentInstanceId,
VariableChangeCallback variableChangeCallback)
Registers a callback invoked when the variable is written with a new value.
|
void |
removeVariableIfFound(java.lang.String name)
Removes a variable.
|
void |
rollback()
Rolls back the variable outstanding changes.
|
void |
setLocalVersion()
Sets the variable version that subsequent reads consider.
|
void |
unregisterCallback(java.lang.String variableName,
int agentInstanceId,
VariableChangeCallback variableChangeCallback)
Removes a callback.
|
void |
write(int variableNumber,
int agentInstanceId,
java.lang.Object newValue)
Writes a new variable value.
|
void setLocalVersion()
java.util.concurrent.locks.ReadWriteLock getReadWriteLock()
void createNewVariable(java.lang.String optionalContextName, java.lang.String variableName, java.lang.String type, boolean constant, boolean array, boolean arrayOfPrimitive, java.lang.Object value, EngineImportService engineImportService) throws VariableExistsException, VariableTypeException
VariableReader getReader(java.lang.String variableName, int agentInstanceIdAccessor)
variableName
- the variable that the reader should readagentInstanceIdAccessor
- agent instance id of accessorvoid registerCallback(java.lang.String variableName, int agentInstanceId, VariableChangeCallback variableChangeCallback)
variableName
- variable nameagentInstanceId
- agent instance idvariableChangeCallback
- a callbackvoid unregisterCallback(java.lang.String variableName, int agentInstanceId, VariableChangeCallback variableChangeCallback)
variableName
- variable nameagentInstanceId
- agent instance idvariableChangeCallback
- a callbackvoid write(int variableNumber, int agentInstanceId, java.lang.Object newValue)
Must be followed by either a commit or rollback.
variableNumber
- the index number of the variable to write (from VariableReader)newValue
- the new valueagentInstanceId
- agent instance idvoid checkAndWrite(java.lang.String variableName, int agentInstanceId, java.lang.Object newValue)
Must be followed by either a commit or rollback.
variableName
- variable nameagentInstanceId
- agent instance idnewValue
- the new valuevoid commit()
void rollback()
java.util.Map<java.lang.String,VariableReader> getVariableReadersNonCP()
VariableMetaData getVariableMetaData(java.lang.String variableName)
void removeVariableIfFound(java.lang.String name)
name
- to removevoid destroy()
java.lang.String isContextVariable(java.lang.String propertyName)
void allocateVariableState(java.lang.String variableName, int agentInstanceId, StatementExtensionSvcContext extensionServicesContext, boolean isRecoveringResilient)
void deallocateVariableState(java.lang.String variableName, int agentInstanceId)
java.util.concurrent.ConcurrentHashMap<java.lang.Integer,VariableReader> getReadersPerCP(java.lang.String variableName)