- All Known Implementing Classes:
- Enclosing class:
public static interface CycleDetectingLockFactory.PolicyEncapsulates the action to be taken when a potential deadlock is encountered. Clients can use one of the predefined
CycleDetectingLockFactory.Policiesor specify a custom implementation. Implementations must be thread-safe.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
handlePotentialDeadlock(CycleDetectingLockFactory.PotentialDeadlockException exception)Called when a potential deadlock is encountered.
handlePotentialDeadlockCalled when a potential deadlock is encountered. Implementations can throw the given
exceptionand/or execute other desired logic.
Note that the method will be called even upon an invocation of
tryLock()technically recovers from deadlock by eventually timing out, this behavior is chosen based on the assumption that it is the application's wish to prohibit any cyclical lock acquisitions.