|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--br.shob.storage.StorageLock
Instances of StorageLock act as reentrant locks used in many storage
operations. Non-reentrant locks can be created overriding the setLocker
method with an empty method.
Notice that the lock synchronizes on the instance's monitor, therefore synchronizing on the lock may lead to deadlocks.
Constructor Summary | |
StorageLock()
Constructor for the StorageLock object |
Method Summary | |
boolean |
isLocked()
Gets the locked attribute of the StorageLock object |
void |
lock()
Description of the Method |
protected void |
setLocker(Thread t)
Sets the locker attribute of the StorageLock object |
void |
unlock()
Description of the Method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StorageLock()
Method Detail |
public boolean isLocked()
public void lock()
public void unlock()
protected void setLocker(Thread t)
t
- The new locker value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |