public enum LockMode extends Enum<LockMode>
An enumeration used by SynchronizerSupport
to specify how an object is locked.
The SynchronizerSupport
interface allows locking an object. This can be done in different ways controlling
the level of concurrency still possible with the object. One of the constants defined here can be passed in when
calling the lock()
method of a SynchronizerSupport
object. (Note that at the end of the day it is up
to a concrete implementation of Synchronizer
how these lock modes are interpreted.)
Enum Constant and Description |
---|
READ
Lock mode READ.
|
WRITE
Lock mode WRITE.
|
Modifier and Type | Method and Description |
---|---|
static LockMode |
valueOf(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 READ
public static LockMode[] values()
for (LockMode c : LockMode.values()) System.out.println(c);
public static LockMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2001–2022 The Apache Software Foundation. All rights reserved.