Enum Class LockUpgradeRule

java.lang.Object
java.lang.Enum<LockUpgradeRule>
org.cojen.tupl.LockUpgradeRule
All Implemented Interfaces:
Serializable, Comparable<LockUpgradeRule>, Constable

public enum LockUpgradeRule extends Enum<LockUpgradeRule>
Defines transaction lock upgrade behavior when using the REPEATABLE_READ lock mode.

Rules ordered from strongest to weakest:

See Also:
  • Enum Constant Details

    • STRICT

      public static final LockUpgradeRule STRICT
      Rule which rejects any shared lock upgrade as illegal. The lock must first be acquired as upgradable.
    • LENIENT

      public static final LockUpgradeRule LENIENT
      Rule which allows an upgrade to succeed, but only when the acting transaction is the sole shared lock owner. If other transactions are also holding the lock, the upgrade attempt is illegal.
    • UNCHECKED

      public static final LockUpgradeRule UNCHECKED
      Rule which always attempts an upgrade, potentially causing a deadlock if multiple transactions are making the same attempt.
  • Method Details

    • values

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