public final class CompoundSemaphore extends Object implements Semaphore
Constructor and Description |
---|
CompoundSemaphore(Semaphore... semaphores) |
Modifier and Type | Method and Description |
---|---|
Semaphore[] |
getSemaphores() |
void |
release(int nrPermits)
release a number of permits.
|
String |
toString() |
boolean |
tryAcquire(int nrPermits,
long deadlineNanos) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
release, toSemaphore
acquire, acquire, tryAcquire, tryAcquire
public CompoundSemaphore(Semaphore... semaphores)
public void release(int nrPermits)
Semaphore
public boolean tryAcquire(int nrPermits, long deadlineNanos) throws InterruptedException
tryAcquire
in interface PermitSupplier
InterruptedException
public Semaphore[] getSemaphores()
Copyright © 2018 SPF4J. All rights reserved.