Enum Transaction.State

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ABORTED
      When a client receives a response to an abort, the transaction state is changed from `ABORTING` to `ABORTED`.
      ABORTING
      When a client invokes an abort, the transaction state is changed from `OPEN` to `ABORTING`.
      COMMITTED
      When a client receives a response to a commit, the transaction state is changed from `COMMITTING` to `COMMITTED`.
      COMMITTING
      When a client invokes a commit, the transaction state is changed from `OPEN` to `COMMITTING`.
      ERROR
      When a client invokes a commit or an abort, but a transaction does not exist in a coordinator, then the state is changed to `ERROR`.
      OPEN
      When a transaction is in the `OPEN` state, messages can be produced and acked with this transaction.
      TIME_OUT
      When a transaction is timed out and the transaction state is `OPEN`, then the transaction state is changed from `OPEN` to `TIME_OUT`.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Transaction.State valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Transaction.State[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • OPEN

        public static final Transaction.State OPEN
        When a transaction is in the `OPEN` state, messages can be produced and acked with this transaction. When a transaction is in the `OPEN` state, it can commit or abort.
      • COMMITTING

        public static final Transaction.State COMMITTING
        When a client invokes a commit, the transaction state is changed from `OPEN` to `COMMITTING`.
      • ABORTING

        public static final Transaction.State ABORTING
        When a client invokes an abort, the transaction state is changed from `OPEN` to `ABORTING`.
      • COMMITTED

        public static final Transaction.State COMMITTED
        When a client receives a response to a commit, the transaction state is changed from `COMMITTING` to `COMMITTED`.
      • ABORTED

        public static final Transaction.State ABORTED
        When a client receives a response to an abort, the transaction state is changed from `ABORTING` to `ABORTED`.
      • ERROR

        public static final Transaction.State ERROR
        When a client invokes a commit or an abort, but a transaction does not exist in a coordinator, then the state is changed to `ERROR`. When a client invokes a commit, but the transaction state in a coordinator is `ABORTED` or `ABORTING`, then the state is changed to `ERROR`. When a client invokes an abort, but the transaction state in a coordinator is `COMMITTED` or `COMMITTING`, then the state is changed to `ERROR`.
      • TIME_OUT

        public static final Transaction.State TIME_OUT
        When a transaction is timed out and the transaction state is `OPEN`, then the transaction state is changed from `OPEN` to `TIME_OUT`.
    • Method Detail

      • values

        public static Transaction.State[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Transaction.State c : Transaction.State.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Transaction.State valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null