railo.commons.lock.rw
Class RWLock<L>

java.lang.Object
  extended by railo.commons.lock.rw.RWLock<L>

public class RWLock<L>
extends Object


Constructor Summary
RWLock(L label)
           
 
Method Summary
 L getLabel()
           
 int getQueueLength()
          Returns an estimate of the number of threads waiting to acquire this lock.
 void lock(long timeout, boolean readOnly)
           
 void unlock(boolean readOnly)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RWLock

public RWLock(L label)
Method Detail

lock

public void lock(long timeout,
                 boolean readOnly)
          throws LockException,
                 LockInterruptedException
Throws:
LockException
LockInterruptedException

unlock

public void unlock(boolean readOnly)

getQueueLength

public int getQueueLength()
Returns an estimate of the number of threads waiting to acquire this lock. The value is only an estimate because the number of threads may change dynamically while this method traverses internal data structures. This method is designed for use in monitoring of the system state, not for synchronization control.

Returns:
the estimated number of threads waiting for this lock

getLabel

public L getLabel()


Copyright © 2012 Railo