railo.commons.lock.rw
Class RWLock<L>
java.lang.Object
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)
|
RWLock
public RWLock(L label)
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