| Enum Constant and Description |
|---|
Exclusive
The ExclusiveLock can be compared with the writelock of a traditional read/write lock.
|
None
No locking is done.
|
Read
The LockMode.Read prevents others to acquire the Write/Exclusive-lock, but it allows others to acquire the
Read lock.
|
Write
The LockMode.Write prevents others to acquire the Read/Write/Exclusive-lock.
|
| Modifier and Type | Method and Description |
|---|---|
int |
asInt() |
static LockMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static LockMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LockMode None
public static final LockMode Read
public static final LockMode Write
public static final LockMode Exclusive
The ExclusiveLock is the TxnLock acquired by the STM once a Txn is prepared for writing changes to a TxnObject.
public static LockMode[] values()
for (LockMode c : LockMode.values()) System.out.println(c);
public static LockMode valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic int asInt()