public class LockManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_LOCK_WAIT_TIMEOUT
Default time an owner waits for obtaining an lock
|
Constructor and Description |
---|
LockManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
foreignChildLocksExists(Lockable lockable,
LockOwner owner)
checks if foreign locks exists on decendant objects of the given lockable
|
int |
getLockStatus(Lockable lockable,
LockOwner owner)
returns the lockstatus of the given lockable for the given owner
if the given lockable is not locked, the lockstatus is retrieved
hierarchically by the parent-lockable
|
void |
obtainLock(Lockable lockable,
LockOwner owner)
obtains a lock on the given lockable for the given owner
|
void |
releaseAllLocks(LockOwner owner)
releases all locks obtained from the given owner
|
void |
releaseLock(Lockable lockable,
LockOwner owner)
releases the lock obtained on the given lockable by the given owner
|
public static final long DEFAULT_LOCK_WAIT_TIMEOUT
public int getLockStatus(Lockable lockable, LockOwner owner) throws WGAPIException
lockable
- owner
- WGAPIException
public void obtainLock(Lockable lockable, LockOwner owner) throws WGAPIException
lockable
- owner
- WGAPIException
public void releaseLock(Lockable lockable, LockOwner owner)
lockable
- owner
- public void releaseAllLocks(LockOwner owner)
owner
- public boolean foreignChildLocksExists(Lockable lockable, LockOwner owner) throws WGAPIException
lockable
- owner
- WGAPIException