EDU.oswego.cs.dl.util.concurrent
Class QueuedSemaphore
- Sync
public abstract class QueuedSemaphore
acquire
public void acquire()
throws InterruptedException
Wait until a permit is available, and take one *
- acquire in interface Sync
- acquire in interface Semaphore
attempt
public boolean attempt(long msecs)
throws InterruptedException
Wait at most msecs millisconds for a permit. *
- attempt in interface Sync
- attempt in interface Semaphore
precheck
protected boolean precheck()
release
public void release()
Release a permit *
- release in interface Sync
- release in interface Semaphore
release
public void release(long n)
Release N permits *
- release in interface Semaphore