Package com.tailf.cdb
Enum Class CdbLockType
- All Implemented Interfaces:
Serializable
,Comparable<CdbLockType>
,Constable
DB lock type flag for Cdb Sessions which controls locking of sessions.
LOCK_SESSION
or LOCK REQUESTS
are mutually exclusive and controls if the lock should be held for the
complete session or for each request respectively.
LOCK_WAIT
can be combined with either
LOCK_SESSION
or LOCK_REQUEST
to control if lock requests should block and wait for lock. Default
behavior is to fail if lock cannot be obtained.
LOCK_PARTIAL
can be combined
with LOCK_REQUEST
to control the lock to hold only for
the subtree from the point of access for the request.
Default behavior is that the complete CDB database is locked.
Locks are combined using EnumSet for example as
EnumSet<CdbLockType> eSet = EnumSet.of(CdbLockType.LOCK_REQUEST,
CdbLockType.LOCK_PARTIAL,
CdbLockType.LOCK_WAIT);
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionControls if locks of type LOCK_REQUEST should be partial i.e.Obtain read lock for each read requestObtain read lock for the complete sessionControls in combination with one of LOCK_SESSION or LOCK_REQUEST if the call should wait instead of fail if lock is not obtained. -
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
static CdbLockType
Returns the enum constant of this class with the specified name.static CdbLockType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
LOCK_WAIT
Controls in combination with one of LOCK_SESSION or LOCK_REQUEST if the call should wait instead of fail if lock is not obtained. Combined using EnumSet -
LOCK_SESSION
Obtain read lock for the complete session -
LOCK_REQUEST
Obtain read lock for each read request -
LOCK_PARTIAL
Controls if locks of type LOCK_REQUEST should be partial i.e. only lock subtree under the point of access
-
-
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
-
getValue
public int getValue()
-