Enum TransactionPropagation

java.lang.Object
java.lang.Enum<TransactionPropagation>
io.vertx.sqlclient.TransactionPropagation
All Implemented Interfaces:
Serializable, Comparable<TransactionPropagation>

public enum TransactionPropagation extends Enum<TransactionPropagation>
Defines how the acquired connection will be managed during the execution of the function provided in Pool.withTransaction(TransactionPropagation, Function).
  • Enum Constant Details

    • NONE

      public static final TransactionPropagation NONE
      The acquired connection is not stored anywhere, making it local to the provided function execution and to wherever it is passed.
    • CONTEXT

      public static final TransactionPropagation CONTEXT
      Keeps the acquired connection stored in the local context for as long as the given function executes. Any subsequent calls to Pool.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

      public static TransactionPropagation[] 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

      public static TransactionPropagation valueOf(String name)
      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 name
      NullPointerException - if the argument is null