Enum TransactionPropagation
- All Implemented Interfaces:
Serializable, Comparable<TransactionPropagation>
Defines how the acquired connection will be managed during the execution of the function provided in
Pool.withTransaction(TransactionPropagation, Function).-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionPropagationReturns the enum constant of this type with the specified name.static TransactionPropagation[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NONE
The acquired connection is not stored anywhere, making it local to the provided function execution and to wherever it is passed. -
CONTEXT
Keeps the acquired connection stored in the local context for as long as the given function executes. Any subsequent calls toPool.withTransaction(Function)with this mode during the function execution will retrieve this connection from the context instead of creating another. The connection is removed from the local context when the function block has completed.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-