Class CycleDetectingLockFactory.PotentialDeadlockException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalStateException
com.google.common.util.concurrent.CycleDetectingLockFactory.ExampleStackTrace
com.google.common.util.concurrent.CycleDetectingLockFactory.PotentialDeadlockException
- All Implemented Interfaces:
Serializable
- Enclosing class:
- CycleDetectingLockFactory
public static final class CycleDetectingLockFactory.PotentialDeadlockException
extends CycleDetectingLockFactory.ExampleStackTrace
Represents a detected cycle in lock acquisition ordering. The exception includes a causal chain
of
ExampleStackTrace instances to illustrate the cycle, e.g.
com....PotentialDeadlockException: Potential Deadlock from LockC -> ReadWriteA at ... at ... Caused by: com...ExampleStackTrace: LockB -> LockC at ... at ... Caused by: com...ExampleStackTrace: ReadWriteA -> LockB at ... at ...
Instances are logged for the Policies.WARN, and thrown for Policies.THROW.
- Since:
- 13.0
- See Also:
-
Field Summary
FieldsFields inherited from class com.google.common.util.concurrent.CycleDetectingLockFactory.ExampleStackTrace
EMPTY_STACK_TRACE, EXCLUDED_CLASS_NAMES -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePotentialDeadlockException(CycleDetectingLockFactory.LockGraphNode node1, CycleDetectingLockFactory.LockGraphNode node2, CycleDetectingLockFactory.ExampleStackTrace conflictingStackTrace) -
Method Summary
Modifier and TypeMethodDescriptionAppends the chain of messages from theconflictingStackTraceto the originalmessage.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
conflictingStackTrace
-
-
Constructor Details
-
PotentialDeadlockException
private PotentialDeadlockException(CycleDetectingLockFactory.LockGraphNode node1, CycleDetectingLockFactory.LockGraphNode node2, CycleDetectingLockFactory.ExampleStackTrace conflictingStackTrace)
-
-
Method Details
-
getConflictingStackTrace
-
getMessage
Appends the chain of messages from theconflictingStackTraceto the originalmessage.- Overrides:
getMessagein classThrowable
-