Enum CycleDetectingLockFactory.Policies
java.lang.Object
java.lang.Enum<CycleDetectingLockFactory.Policies>
com.google.common.util.concurrent.CycleDetectingLockFactory.Policies
- All Implemented Interfaces:
- CycleDetectingLockFactory.Policy, Serializable, Comparable<CycleDetectingLockFactory.Policies>, Constable
- Enclosing class:
- CycleDetectingLockFactory
public static enum CycleDetectingLockFactory.Policies
extends Enum<CycleDetectingLockFactory.Policies>
implements CycleDetectingLockFactory.Policy
Pre-defined 
CycleDetectingLockFactory.Policy implementations.- Since:
- 13.0
- Author:
- Darick Tong
- 
Nested Class SummaryNested classes/interfaces inherited from class EnumEnum.EnumDesc<E>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionDisables cycle detection.When potential deadlock is detected, this policy results in the throwing of thePotentialDeadlockExceptionindicating the potential deadlock, which includes stack traces illustrating the cycle in lock acquisition order.When potential deadlock is detected, this policy results in the logging of aLevel.SEVEREmessage indicating the potential deadlock, which includes stack traces illustrating the cycle in lock acquisition order.
- 
Method SummaryModifier and TypeMethodDescriptionReturns 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.Methods inherited from class Enumclone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface CycleDetectingLockFactory.PolicyhandlePotentialDeadlock
- 
Enum Constant Details- 
THROWWhen potential deadlock is detected, this policy results in the throwing of thePotentialDeadlockExceptionindicating the potential deadlock, which includes stack traces illustrating the cycle in lock acquisition order.
- 
WARNWhen potential deadlock is detected, this policy results in the logging of aLevel.SEVEREmessage indicating the potential deadlock, which includes stack traces illustrating the cycle in lock acquisition order.
- 
DISABLEDDisables cycle detection. This option causes the factory to return unmodified lock implementations provided by the JDK, and is provided to allow applications to easily parameterize when cycle detection is enabled.Note that locks created by a factory with this policy will not participate the cycle detection performed by locks created by other factories. 
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
 
- 
valueOfReturns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
- NullPointerException- if the argument is null
 
 
-