Enum Class TransactionResult

java.lang.Object
java.lang.Enum<TransactionResult>
com.pyranid.TransactionResult
All Implemented Interfaces:
Serializable, Comparable<TransactionResult>, Constable

Indicates the transaction result reported to post-transaction operations.
Since:
2.0.0
Author:
Mark Allen
  • Enum Constant Details

    • COMMITTED

      public static final TransactionResult COMMITTED
      Commit completed successfully.
    • ROLLED_BACK

      public static final TransactionResult ROLLED_BACK
      Pyranid can prove that no application transaction work committed.

      This includes a successful rollback before commit, a successful follow-up rollback after the physical commit reports a recognized serialization failure, and a failed physical-transaction begin whose candidate connection Pyranid discarded before application transaction work could execute. Therefore, this result does not necessarily mean that Pyranid invoked the JDBC rollback() method.

    • IN_DOUBT

      public static final TransactionResult IN_DOUBT
      Pyranid cannot prove the final database outcome because commit failed without a recognized serialization failure followed by successful rollback, or because rollback failed after application transaction work could have executed.

      For example, the database may have committed successfully but the client may not have received the acknowledgement, or rollback may have failed before the database confirmed that pending work was discarded. A rollback failure while cleaning up a failed physical-transaction begin is not IN_DOUBT when application transaction work could not have executed; Pyranid discards the candidate connection and reports ROLLED_BACK.

      Since:
      4.2.0
  • Method Details

    • values

      public static TransactionResult[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TransactionResult valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null