|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jcs.utils.locking.ReadWriteLockManager
The Generic ReadWriteLock Manager for various resources.
Field Summary | |
private static RwLockGC |
gc
Used to asynchronously remove unused RwLockHolder objects managed ty this manager. |
private java.util.Hashtable |
locks
Hashtable of locks managed |
private static org.apache.commons.logging.Log |
log
|
Constructor Summary | |
ReadWriteLockManager()
|
Method Summary | |
void |
done(java.lang.String id)
Release the read/write lock previously placed on the specified resource. |
private void |
ensureGarbageCollectorCreated()
Ensures that the lock garbage collector has been created |
protected java.util.Hashtable |
getLocks()
Returns the lock table of all the resources managed by the subclass. |
private void |
lock(java.lang.String id,
boolean isWrite)
Places either a read or write lock on the specified resource. |
void |
readLock(java.lang.String id)
Places a read lock on the specified resource. |
void |
writeLock(java.lang.String id)
Places a write lock on the specified resource. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final org.apache.commons.logging.Log log
private static RwLockGC gc
private java.util.Hashtable locks
Constructor Detail |
public ReadWriteLockManager()
Method Detail |
public final void readLock(java.lang.String id) throws java.lang.InterruptedException
java.lang.InterruptedException
public final void writeLock(java.lang.String id) throws java.lang.InterruptedException
java.lang.InterruptedException
private void lock(java.lang.String id, boolean isWrite) throws java.lang.InterruptedException
java.lang.InterruptedException
private void ensureGarbageCollectorCreated()
public final void done(java.lang.String id)
protected java.util.Hashtable getLocks()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |