Enum Class TransactionResult
- All Implemented Interfaces:
Serializable, Comparable<TransactionResult>, Constable
- Since:
- 2.0.0
- Author:
- Mark Allen
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCommit completed successfully.Pyranid cannot prove the final database outcome because an issued JDBC commit failed without narrow affirmative serialization-abort evidence followed by acknowledged rollback, or because rollback was not acknowledged after application transaction work could have executed.Pyranid can prove that no application transaction work committed. -
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionResultReturns the enum constant of this class with the specified name.static TransactionResult[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
COMMITTED
Commit completed successfully. -
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 narrowly proven serialization abort, a successful rollback after pre-commit validation or a savepoint-scope ownership conflict refused the commit before it was issued, 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
Pyranid cannot prove the final database outcome because an issued JDBC commit failed without narrow affirmative serialization-abort evidence followed by acknowledged rollback, or because rollback was not acknowledged after application transaction work could have executed. A failure before JDBC commit dispatch does not make the outcome uncertain when the follow-up rollback succeeds. Acknowledged commit or rollback retains its known database result even if subsequent diagnostics fail. General serialization diagnostics, including a secondary40001under an uncertain primary commit failure, do not by themselves prove rollback. Validation success likewise does not prove that a later failed commit aborted.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_DOUBTwhen application transaction work could not have executed; Pyranid discards the candidate connection and reportsROLLED_BACK. A savepoint-scope ownership conflict that refuses the commit before it is issued is notIN_DOUBTwhen the follow-up rollback succeeds; the database never received the commit, so Pyranid reportsROLLED_BACK. The same conflict followed by a failed rollback remainsIN_DOUBT.- Since:
- 4.2.0
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-