Class TransactionIdContext

    • Constructor Detail

      • TransactionIdContext

        public TransactionIdContext​(Context parent,
                                    TransactionId transactionId)
        Constructs a new TransactionIdContext.
        Parameters:
        parent - The parent context
        transactionId - The transaction id to use in this context
      • TransactionIdContext

        public TransactionIdContext​(JsonValue savedContext,
                                    ClassLoader classLoader)
        Restores a saved context.
        Parameters:
        savedContext - The saved state.
        classLoader - The ClassLoader to use.
    • Method Detail

      • getTransactionId

        public TransactionId getTransactionId()
        Returns the transaction id.
        Returns:
        the transaction id
      • toJsonValue

        public JsonValue toJsonValue()
        Updates the data object to have the current transactionId state. Return this Context as a JsonValue (for persistence).
        Specified by:
        toJsonValue in interface Context
        Overrides:
        toJsonValue in class AbstractContext
        Returns:
        the Context data as a JsonValue.