Package jakarta.ejb

Enum Class LockType

All Implemented Interfaces:
Serializable, Comparable<LockType>, Constable

public enum LockType extends Enum<LockType>
Concurrency lock type for singleton beans with container-managed concurrency.
Since:
EJB 3.1
  • Enum Constant Details

    • READ

      public static final LockType READ
      For read-only operations. Allows simultaneous access to methods designated as READ, as long as no WRITE lock is held.
    • WRITE

      public static final LockType WRITE
      For exclusive access to the bean instance. A WRITE lock can only be acquired when no other method with either a READ or WRITE lock is currently held.
  • Method Details

    • values

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