Contents
Enum Class LockUpgradeRule
- All Implemented Interfaces:
Serializable
,Comparable<LockUpgradeRule>
,Constable
Defines transaction lock upgrade behavior when using the
REPEATABLE_READ
lock mode.
Rules ordered from strongest to weakest:
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRule which allows an upgrade to succeed, but only when the acting transaction is the sole shared lock owner.Rule which rejects any shared lock upgrade as illegal.Rule which always attempts an upgrade, potentially causing a deadlock if multiple transactions are making the same attempt. -
Method Summary
Modifier and TypeMethodDescriptionstatic LockUpgradeRule
Returns the enum constant of this class with the specified name.static LockUpgradeRule[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRICT
Rule which rejects any shared lock upgrade as illegal. The lock must first be acquired as upgradable. -
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
Rule which always attempts an upgrade, potentially causing a deadlock if multiple transactions are making the same attempt.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-