public class NamedLockManager extends Object
Constructor and Description |
---|
NamedLockManager() |
Modifier and Type | Method and Description |
---|---|
LockResult |
attemptToLock(UserIF user,
Collection objects,
String nameBase,
javax.servlet.http.HttpSession session)
INTERNAL: Attempts to lock all the objects in the input collection and
assigns name to the collection for later retrieval.
|
void |
clear()
INTERNAL: For testing purposes only.
|
int |
lockCountFor(Object user)
INTERNAL: Returns the number of locks held by the user.
|
boolean |
ownsLock(UserIF user,
String name)
INTERNAL: Returns true if the user owns the given lock.
|
void |
releaseLocksFor(UserIF user)
INTERNAL: Releases all the locks that the user owns.
|
void |
unlock(UserIF user,
String name,
boolean forced)
INTERNAL:
If forced is false, unlocks the lock with the given 'name' for the given
user.
|
static boolean |
usesTimedLockExpiry(javax.servlet.http.HttpSession session)
INTERNAL: Returns true if the session has support for time-based
lock expiry.
|
public LockResult attemptToLock(UserIF user, Collection objects, String nameBase, javax.servlet.http.HttpSession session)
public void unlock(UserIF user, String name, boolean forced)
public boolean ownsLock(UserIF user, String name)
public void releaseLocksFor(UserIF user)
public static boolean usesTimedLockExpiry(javax.servlet.http.HttpSession session)
public int lockCountFor(Object user)
public void clear()