Package io.zeebe.engine.state.instance
Class VariablesState
- java.lang.Object
-
- io.zeebe.engine.state.instance.VariablesState
-
public class VariablesState extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceVariablesState.VariableListener
-
Field Summary
Fields Modifier and Type Field Description static intNO_PARENT
-
Constructor Summary
Constructors Constructor Description VariablesState(ZeebeDb<ZbColumnFamilies> zeebeDb, DbContext dbContext, KeyGenerator keyGenerator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateScope(long childKey, long parentKey)org.agrona.DirectBuffergetTemporaryVariables(long scopeKey)org.agrona.DirectBuffergetVariable(long scopeKey, org.agrona.DirectBuffer name)Find the variable with the given name.org.agrona.DirectBuffergetVariable(long scopeKey, org.agrona.DirectBuffer name, int nameOffset, int nameLength)Find the variable with the given name.org.agrona.DirectBuffergetVariableLocal(long scopeKey, org.agrona.DirectBuffer name)org.agrona.DirectBuffergetVariablesAsDocument(long scopeKey)org.agrona.DirectBuffergetVariablesAsDocument(long scopeKey, Collection<org.agrona.DirectBuffer> names)org.agrona.DirectBuffergetVariablesLocalAsDocument(long scopeKey)booleanisEmpty()voidremoveAllVariables(long scopeKey)voidremoveScope(long scopeKey)voidremoveTemporaryVariables(long scopeKey)voidsetListener(VariablesState.VariableListener listener)voidsetTemporaryVariables(long scopeKey, org.agrona.DirectBuffer variables)voidsetVariableLocal(long scopeKey, long workflowKey, org.agrona.DirectBuffer name, int nameOffset, int nameLength, org.agrona.DirectBuffer value, int valueOffset, int valueLength)voidsetVariableLocal(long scopeKey, long workflowKey, org.agrona.DirectBuffer name, org.agrona.DirectBuffer value)voidsetVariableLocal(long scopeKey, long workflowKey, org.agrona.DirectBuffer name, org.agrona.DirectBuffer value, int valueOffset, int valueLength)voidsetVariablesFromDocument(long scopeKey, long workflowKey, org.agrona.DirectBuffer document)voidsetVariablesLocalFromDocument(long scopeKey, long workflowKey, org.agrona.DirectBuffer document)
-
-
-
Field Detail
-
NO_PARENT
public static final int NO_PARENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VariablesState
public VariablesState(ZeebeDb<ZbColumnFamilies> zeebeDb, DbContext dbContext, KeyGenerator keyGenerator)
-
-
Method Detail
-
setVariablesLocalFromDocument
public void setVariablesLocalFromDocument(long scopeKey, long workflowKey, org.agrona.DirectBuffer document)
-
setVariableLocal
public void setVariableLocal(long scopeKey, long workflowKey, org.agrona.DirectBuffer name, org.agrona.DirectBuffer value)
-
setVariableLocal
public void setVariableLocal(long scopeKey, long workflowKey, org.agrona.DirectBuffer name, org.agrona.DirectBuffer value, int valueOffset, int valueLength)
-
setVariableLocal
public void setVariableLocal(long scopeKey, long workflowKey, org.agrona.DirectBuffer name, int nameOffset, int nameLength, org.agrona.DirectBuffer value, int valueOffset, int valueLength)
-
getVariableLocal
public org.agrona.DirectBuffer getVariableLocal(long scopeKey, org.agrona.DirectBuffer name)
-
getVariable
public org.agrona.DirectBuffer getVariable(long scopeKey, org.agrona.DirectBuffer name)Find the variable with the given name. If the variable is not present in the given scope then it looks in the parent scope and continues until it is found.- Parameters:
scopeKey- the key of the variable scope to start fromname- the name of the variable- Returns:
- the value of the variable, or
nullif it is not present in the variable scope
-
getVariable
public org.agrona.DirectBuffer getVariable(long scopeKey, org.agrona.DirectBuffer name, int nameOffset, int nameLength)Find the variable with the given name. If the variable is not present in the given scope then it looks in the parent scope and continues until it is found.- Parameters:
scopeKey- the key of the variable scope to start fromname- the buffer that contains the name of the variablenameOffset- the offset of name in the buffernameLength- the length of the name in the buffer- Returns:
- the value of the variable, or
nullif it is not present in the variable scope
-
setVariablesFromDocument
public void setVariablesFromDocument(long scopeKey, long workflowKey, org.agrona.DirectBuffer document)
-
getVariablesAsDocument
public org.agrona.DirectBuffer getVariablesAsDocument(long scopeKey)
-
getVariablesAsDocument
public org.agrona.DirectBuffer getVariablesAsDocument(long scopeKey, Collection<org.agrona.DirectBuffer> names)
-
getVariablesLocalAsDocument
public org.agrona.DirectBuffer getVariablesLocalAsDocument(long scopeKey)
-
createScope
public void createScope(long childKey, long parentKey)
-
removeScope
public void removeScope(long scopeKey)
-
removeAllVariables
public void removeAllVariables(long scopeKey)
-
setTemporaryVariables
public void setTemporaryVariables(long scopeKey, org.agrona.DirectBuffer variables)
-
getTemporaryVariables
public org.agrona.DirectBuffer getTemporaryVariables(long scopeKey)
-
removeTemporaryVariables
public void removeTemporaryVariables(long scopeKey)
-
isEmpty
public boolean isEmpty()
-
setListener
public void setListener(VariablesState.VariableListener listener)
-
-