railo.commons.lock
Class SimpleLock<L>
java.lang.Object
railo.commons.lock.SimpleLock<L>
- All Implemented Interfaces:
- Lock
public class SimpleLock<L>
- extends Object
- implements Lock
SimpleLock
public SimpleLock(L label)
lock
public void lock(long timeout)
throws LockException,
LockInterruptedException
- Specified by:
lock
in interface Lock
- Throws:
LockException
LockInterruptedException
unlock
public void unlock()
- Specified by:
unlock
in interface Lock
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.
- Specified by:
getQueueLength
in interface Lock
- Returns:
- the estimated number of threads waiting for this lock
getLabel
public L getLabel()
Copyright © 2012 Railo