public enum Locking extends Enum<Locking>
Enum Constant and Description |
---|
SPIN
Spin lock blocking is good for locks held very shortly or generally uncontended locks and
is therefore the default.
|
SUSPEND
Blocking that suspends a thread and notifies a thread to wake up can be
more expensive then spin locks.
|
Modifier and Type | Method and Description |
---|---|
static Locking |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Locking[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Locking SPIN
public static final Locking SUSPEND
public static Locking[] values()
for (Locking c : Locking.values()) System.out.println(c);
public static Locking 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 © 2005–2018. All rights reserved.