Enum Class Tx.Type

java.lang.Object
java.lang.Enum<Tx.Type>
io.helidon.transaction.Tx.Type
All Implemented Interfaces:
Serializable, Comparable<Tx.Type>, Constable
Enclosing class:
Tx

public static enum Tx.Type extends Enum<Tx.Type>
Transaction type.

An enum describing the possible ways in which transactional support must be applied to transactional method executions.

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Indicates that a transaction must already be in effect when a method executes.
    Indicates that no transaction must be in effect when a method executes.
    Indicates that a new transaction will be started when a method executes.
    Indicates that transaction will be in effect when a method executes.
    Indicates that transaction may optionally be in effect when a method executes.
    Indicates that no transaction will be in effect when a method executes.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Tx.Type
    Returns the enum constant of this class with the specified name.
    static Tx.Type[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • MANDATORY

      public static final Tx.Type MANDATORY
      Indicates that a transaction must already be in effect when a method executes. If called outside a transaction context, the TxException must be thrown. If called inside a transaction context, method execution will then continue under that context.
    • NEW

      public static final Tx.Type NEW
      Indicates that a new transaction will be started when a method executes. If called outside a transaction context, the interceptor must begin a new transaction. The managed bean method execution must then continue inside this transaction context, and the transaction must be completed by the interceptor. If called inside a transaction context, the current transaction context must be suspended. New transaction will begin, the managed method execution must then continue inside this transaction context. The transaction must be completed, and the previously suspended transaction must be resumed.
    • NEVER

      public static final Tx.Type NEVER
      Indicates that no transaction must be in effect when a method executes. If called outside a transaction context, method execution must then continue outside a transaction context. If called inside a transaction context, the TxException must be thrown.
    • REQUIRED

      public static final Tx.Type REQUIRED
      Indicates that transaction will be in effect when a method executes. If called outside a transaction context, the interceptor must begin a new transaction. The managed bean method execution must then continue inside this transaction context, and the transaction must be completed by the interceptor. If called inside a transaction context, the method execution must then continue inside this transaction context.
    • SUPPORTED

      public static final Tx.Type SUPPORTED
      Indicates that transaction may optionally be in effect when a method executes. If called outside a transaction context, method execution must then continue outside a transaction context. If called inside a transaction context, the method execution must then continue inside this transaction context.
    • UNSUPPORTED

      public static final Tx.Type UNSUPPORTED
      Indicates that no transaction will be in effect when a method executes. If called outside a transaction context, method execution must then continue outside a transaction context. If called inside a transaction context, the current transaction context must be suspended. The method execution must then continue outside a transaction context, and the previously suspended transaction must be resumed by the interceptor that suspended it after the method execution has completed.
  • Method Details

    • values

      public static Tx.Type[] 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

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