Enum Class GcTransactionType
- All Implemented Interfaces:
Serializable
,Comparable<GcTransactionType>
,java.lang.constant.Constable
enum of possible transaction types
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptioneven if in a current tx, do not use transactionseven if in the middle of a transaction, create a new read/write autonomous nested transaction.use the current transaction if one exists.even if in the middle of a transaction, create a new readonly autonomous nested transaction.use the current transaction if one exists, if not, create a new readonly tx. -
Method Summary
Modifier and TypeMethodDescriptionstatic GcTransactionType
Returns the enum constant of this class with the specified name.static GcTransactionType
valueOfIgnoreCase
(String string) do a case-insensitive matchingstatic GcTransactionType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
READONLY_OR_USE_EXISTING
use the current transaction if one exists, if not, create a new readonly tx. Note, the enclosing transaction could be readonly or readwrite, and no error will be thrown. However, no matter what, this code cannot commit or rollback... -
NONE
even if in a current tx, do not use transactions -
READONLY_NEW
even if in the middle of a transaction, create a new readonly autonomous nested transaction. Code in this state cannot commit or rollback. -
READ_WRITE_OR_USE_EXISTING
use the current transaction if one exists. If there is a current transaction, it MUST be read/write or there will be an exception. If there isnt a transaction in scope, then create a new read/write one. If you do not commit at the end, and there is a normal return (no exception), then the transaction will be committed if new, and not if reusing an existing one. If there is an exception, and the tx is new, it will be rolledback. If there is an exception and the tx is reused, the tx will not be touched, and the exception will propagate. -
READ_WRITE_NEW
even if in the middle of a transaction, create a new read/write autonomous nested transaction. If this block is exited normally it will always commit. If exception is thrown, it will always rollback.
-
-
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
-
valueOfIgnoreCase
do a case-insensitive matching- Parameters:
string
-- Returns:
- the enum or null or exception if not found
-