|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A manager for multi level locks on resources. Encapsulates creation, removal, and retrieval of locks.
Each resource can have at most a single lock. However, it may be possible for more than one
accessing entity to have influence on this lock via different lock levels that may be
provided by the according implementation of MultiLevelLock
.
MultiLevelLock
Method Summary | |
MultiLevelLock |
atomicGetOrCreateLock(java.lang.Object resourceId)
Either gets an existing lock on the specified resource or creates one if none exists. |
MultiLevelLock |
getLock(java.lang.Object resourceId)
Gets an existing lock on the specified resource. |
void |
removeLock(MultiLevelLock lock)
Removes the specified lock from the associated resource. |
Method Detail |
public MultiLevelLock atomicGetOrCreateLock(java.lang.Object resourceId)
resourceId
- the resource to get or create the lock on
public MultiLevelLock getLock(java.lang.Object resourceId)
null
.
resourceId
- the resource to get the lock for
public void removeLock(MultiLevelLock lock)
lock
- the lock to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |