|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.transaction.locking.GenericLockManager
Manager for GenericLock
s on resources.
Field Summary | |
protected Map |
globalLocks
|
protected LoggerFacade |
logger
|
protected int |
maxLockLevel
|
Constructor Summary | |
GenericLockManager(int maxLockLevel,
LoggerFacade logger)
|
Method Summary | |
MultiLevelLock |
atomicGetOrCreateLock(Object resourceId)
Either gets an existing lock on the specified resource or creates one if none exists. |
protected GenericLock |
createLock(Object resourceId)
|
MultiLevelLock |
getLock(Object resourceId)
Gets an existing lock on the specified resource. |
Collection |
getLocks()
Gets all locks as orignials, no copies. |
void |
removeLock(MultiLevelLock lock)
Removes the specified lock from the associated resource. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Map globalLocks
protected int maxLockLevel
protected LoggerFacade logger
Constructor Detail |
public GenericLockManager(int maxLockLevel, LoggerFacade logger) throws IllegalArgumentException
Method Detail |
public MultiLevelLock getLock(Object resourceId)
LockManager
null
.
getLock
in interface LockManager
resourceId
- the resource to get the lock for
public MultiLevelLock atomicGetOrCreateLock(Object resourceId)
LockManager
atomicGetOrCreateLock
in interface LockManager
resourceId
- the resource to get or create the lock on
public void removeLock(MultiLevelLock lock)
LockManager
removeLock
in interface LockManager
lock
- the lock to be removedpublic Collection getLocks()
protected GenericLock createLock(Object resourceId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |