Enum TransactionStatus

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TransactionStatus>

    public enum TransactionStatus
    extends java.lang.Enum<TransactionStatus>
    The status of the transaction A transaction may not enter all of the states in this enum, however it will always traverse the enum in ascending order. In particular if the TransactionStatus is reported as X then it will never proceed into a state Y where X.compareTo(Y) >= 0;
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ACTIVE
      A transaction is currently in progress
      COMMITTED
      The transaction has committed
      COMMITTING
      The transaction is in the process of being committed
      MARKED_ROLLBACK
      A transaction is currently in progress and has been marked for rollback
      NO_TRANSACTION
      No transaction is currently active
      PREPARED
      A two phase commit is occurring and the transaction has been prepared
      PREPARING
      A two phase commit is occurring and the transaction is being prepared
      ROLLED_BACK
      The transaction has been rolled back
      ROLLING_BACK
      The transaction is in the process of rolling back
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static TransactionStatus valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static TransactionStatus[] 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

      • NO_TRANSACTION

        public static final TransactionStatus NO_TRANSACTION
        No transaction is currently active
      • ACTIVE

        public static final TransactionStatus ACTIVE
        A transaction is currently in progress
      • MARKED_ROLLBACK

        public static final TransactionStatus MARKED_ROLLBACK
        A transaction is currently in progress and has been marked for rollback
      • PREPARING

        public static final TransactionStatus PREPARING
        A two phase commit is occurring and the transaction is being prepared
      • PREPARED

        public static final TransactionStatus PREPARED
        A two phase commit is occurring and the transaction has been prepared
      • COMMITTING

        public static final TransactionStatus COMMITTING
        The transaction is in the process of being committed
      • COMMITTED

        public static final TransactionStatus COMMITTED
        The transaction has committed
      • ROLLING_BACK

        public static final TransactionStatus ROLLING_BACK
        The transaction is in the process of rolling back
      • ROLLED_BACK

        public static final TransactionStatus ROLLED_BACK
        The transaction has been rolled back
    • Method Detail

      • values

        public static TransactionStatus[] 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 (TransactionStatus c : TransactionStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TransactionStatus 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