Class DbVariableState

    • Method Detail

      • setVariableLocal

        public void setVariableLocal​(long key,
                                     long scopeKey,
                                     long processDefinitionKey,
                                     org.agrona.DirectBuffer name,
                                     org.agrona.DirectBuffer value)
        Description copied from interface: MutableVariableState
        Creates or updates the variable with name within the given scope with scopeKey, setting its value to the given value.

        This method is expected to be called directly ONLY from an EventApplier or from tests.

        Specified by:
        setVariableLocal in interface MutableVariableState
        Parameters:
        key - the variable key
        scopeKey - the local scope of the variable
        processDefinitionKey - the associated process key, mostly for monitoring purposes
        name - the name of the variable
        value - the value of the variable (MsgPack encoded)
      • setVariableLocal

        public void setVariableLocal​(long key,
                                     long scopeKey,
                                     long processDefinitionKey,
                                     org.agrona.DirectBuffer name,
                                     int nameOffset,
                                     int nameLength,
                                     org.agrona.DirectBuffer value,
                                     int valueOffset,
                                     int valueLength)
        Description copied from interface: MutableVariableState
        Creates or updates the variable with name within the given scope with scopeKey, setting its value to the given value.

        This method is expected to be called directly ONLY from an EventApplier or from tests.

        Specified by:
        setVariableLocal in interface MutableVariableState
        Parameters:
        key - the variable key
        scopeKey - the local scope of the variable
        processDefinitionKey - the associated process key, mostly for monitoring purposes
        name - the name of the variable
        nameOffset - offset at which the name starts in the name buffer
        nameLength - length of the variable name in the name buffer
        value - the value of the variable (MsgPack encoded)
        valueOffset - offset at which the value starts in the value buffer
        valueLength - length of the variable value in the value buffer
      • getVariableLocal

        public org.agrona.DirectBuffer getVariableLocal​(long scopeKey,
                                                        org.agrona.DirectBuffer name)
        Specified by:
        getVariableLocal in interface VariableState
      • 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.
        Specified by:
        getVariable in interface VariableState
        Parameters:
        scopeKey - the key of the variable scope to start from
        name - the name of the variable
        Returns:
        the value of the variable, or null if 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.
        Specified by:
        getVariable in interface VariableState
        Parameters:
        scopeKey - the key of the variable scope to start from
        name - the buffer that contains the name of the variable
        nameOffset - the offset of name in the buffer
        nameLength - the length of the name in the buffer
        Returns:
        the value of the variable, or null if it is not present in the variable scope