public static class SessionLock.UUIDLockCount extends java.lang.Object implements LockCountManager<SessionToken>
LockCountManager counting session tokens with an equality
based on their UUIDs (of the corresponding top-level session token). This
means, subsessions are equal to parent sessions (and vice versa).| Constructor and Description |
|---|
UUIDLockCount()
Creates a new
LockCountManager for session tokens, which
considers parent and child sessions as equal. |
| Modifier and Type | Method and Description |
|---|---|
int |
decreaseAndGetLockCount(SessionToken session)
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(SessionToken session)
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(SessionToken session)
Increases the number of times the designated object holds the lock.
|
public UUIDLockCount()
LockCountManager for session tokens, which
considers parent and child sessions as equal.public boolean hasLock(SessionToken session)
LockCountManagerhasLock in interface LockCountManager<SessionToken>session - The object which is checked whether it holds a lock.public boolean hasLocks()
LockCountManagerhasLocks in interface LockCountManager<SessionToken>public java.lang.String getLockOwner()
LockCountManagergetLockOwner in interface LockCountManager<SessionToken>public int increaseAndGetLockCount(SessionToken session)
LockCountManagerincreaseAndGetLockCount in interface LockCountManager<SessionToken>session - The object which has acquired the lock (once again).public int decreaseAndGetLockCount(SessionToken session)
LockCountManagerdecreaseAndGetLockCount in interface LockCountManager<SessionToken>session - The object which has released the lock (once again).