org.apache.jcs.utils.locking
Class ReadWriteLockManager

java.lang.Object
  extended byorg.apache.jcs.utils.locking.ReadWriteLockManager

public class ReadWriteLockManager
extends java.lang.Object

The Generic ReadWriteLock Manager for various resources.


Constructor Summary
ReadWriteLockManager()
           
 
Method Summary
 void done(java.lang.String id)
          Release the read/write lock previously placed on the specified resource.
protected  java.util.Hashtable getLocks()
          Returns the lock table of all the resources managed by the subclass.
 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
 

Constructor Detail

ReadWriteLockManager

public ReadWriteLockManager()
Method Detail

readLock

public final void readLock(java.lang.String id)
                    throws java.lang.InterruptedException
Places a read lock on the specified resource.

Throws:
java.lang.InterruptedException

writeLock

public final void writeLock(java.lang.String id)
                     throws java.lang.InterruptedException
Places a write lock on the specified resource.

Throws:
java.lang.InterruptedException

done

public final void done(java.lang.String id)
Release the read/write lock previously placed on the specified resource.


getLocks

protected java.util.Hashtable getLocks()
Returns the lock table of all the resources managed by the subclass.

Returns:
The locks value


Copyright © 2002-2005 Apache Software Foundation. All Rights Reserved.