ID
- Lock identification provided by the client, is returned unmodified to the client
when lock cycle is detected to identify it. Only toString() needs to be implemented.
Lock references this object internally,
for the purposes of Garbage Collection you should not use heavy IDs.
Lock is referenced by a lock factory as long as it's owned by a thread.interface CycleDetectingLock<ID>
Lock
that is special due to how it handles deadlocks detection.
Is an inherent part of SingletonScope
, moved into a upper level class due
to its size and complexity.
Modifier and Type | Interface and Description |
---|---|
static class |
CycleDetectingLock.CycleDetectingLockFactory<ID>
Wraps locks so they would never cause a deadlock.
|
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ListMultimap<java.lang.Long,ID> |
lockOrDetectPotentialLocksCycle()
Takes a lock in a blocking fashion in case no potential deadlocks are detected.
|
void |
unlock()
Unlocks previously locked lock.
|
com.google.common.collect.ListMultimap<java.lang.Long,ID> lockOrDetectPotentialLocksCycle()
void unlock()