public enum TransactionPropagation extends Enum<TransactionPropagation>
Pool.withTransaction(TransactionPropagation, Function)
.Enum Constant and Description |
---|
CONTEXT
Keeps the acquired connection stored in the local context for as long as the given function executes.
|
NONE
The acquired connection is not stored anywhere, making it local to the provided function execution and to
wherever it is passed.
|
Modifier and Type | Method and Description |
---|---|
static TransactionPropagation |
valueOf(String name)
Returns 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.
|
public static final TransactionPropagation NONE
public static final TransactionPropagation CONTEXT
Pool.withTransaction(java.util.function.Function<io.vertx.sqlclient.SqlConnection, io.vertx.core.Future<T>>, io.vertx.core.Handler<io.vertx.core.AsyncResult<T>>)
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.public static TransactionPropagation[] values()
for (TransactionPropagation c : TransactionPropagation.values()) System.out.println(c);
public static TransactionPropagation valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2024 Eclipse. All rights reserved.