public static class SessionLock.ChildSessionIDLockCount extends java.lang.Object implements LockCountManager<SessionToken>
LockCountManager counting session tokens with an equality
based on child session IDs. This means, (child) session tokens are equal to
the very same object or a copy hereof.
This is similar to
ObjectEqualityLockCount except
that this lock count manager also treats copies of the very same session
token object as equal.
| Constructor and Description |
|---|
ChildSessionIDLockCount()
Creates a new
LockCountManager for session tokens, which
is based on child session ID equality, that is only a specific child
session token or copies of the very same object are considered 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 ChildSessionIDLockCount()
LockCountManager for session tokens, which
is based on child session ID equality, that is only a specific child
session token or copies of the very same object are considered 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).