L - The type of objects of which the lock acquisitions are to be
counted by this lock count manager (lock owning type).public interface LockCountManager<L>
LockCountManager provides the means to manage reentrant
locks based on objects by counting lock acquisitions. This also
encapsulates how objects are compared. If two objects are to be equal,
hasLock(Object), increaseAndGetLockCount(Object) as well
as decreaseAndGetLockCount(Object) have to be implemented
accordingly.| Modifier and Type | Method and Description |
|---|---|
int |
decreaseAndGetLockCount(L object)
Decreases the number of times the designated object holds the lock.
|
java.lang.String |
getLockOwner()
Returns a string representation of one object that currently has a lock.
|
boolean |
hasLock(L object)
Returns whether the designated object has a lock at least once.
|
boolean |
hasLocks()
Returns whether this lock count manager knows at least one object that
has a lock.
|
int |
increaseAndGetLockCount(L object)
Increases the number of times the designated object holds the lock.
|
boolean hasLock(L object)
object - The object which is checked whether it holds a lock.boolean hasLocks()
java.lang.String getLockOwner()
int increaseAndGetLockCount(L object)
object - The object which has acquired the lock (once again).int decreaseAndGetLockCount(L object)
object - The object which has released the lock (once again).