@Beta public static enum CycleDetectingLockFactory.Policies extends Enum<CycleDetectingLockFactory.Policies> implements CycleDetectingLockFactory.Policy
CycleDetectingLockFactory.Policy
implementations.Enum Constant and Description |
---|
DISABLED
Disables cycle detection.
|
THROW
When potential deadlock is detected, this policy results in the throwing
of the
PotentialDeadlockException indicating the potential
deadlock, which includes stack traces illustrating the cycle in lock
acquisition order. |
WARN
When potential deadlock is detected, this policy results in the logging
of a
Level.SEVERE message indicating the potential deadlock,
which includes stack traces illustrating the cycle in lock acquisition
order. |
Modifier and Type | Method and Description |
---|---|
static CycleDetectingLockFactory.Policies |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CycleDetectingLockFactory.Policies[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
handlePotentialDeadlock
public static final CycleDetectingLockFactory.Policies THROW
PotentialDeadlockException
indicating the potential
deadlock, which includes stack traces illustrating the cycle in lock
acquisition order.public static final CycleDetectingLockFactory.Policies WARN
Level.SEVERE
message indicating the potential deadlock,
which includes stack traces illustrating the cycle in lock acquisition
order.public static final CycleDetectingLockFactory.Policies DISABLED
Note that locks created by a factory with this policy will not participate the cycle detection performed by locks created by other factories.
public static CycleDetectingLockFactory.Policies[] values()
for (CycleDetectingLockFactory.Policies c : CycleDetectingLockFactory.Policies.values()) System.out.println(c);
public static CycleDetectingLockFactory.Policies 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 © 2010-2013. All Rights Reserved.