|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.concurrent.Semaphore
com.unboundid.scim.wink.AdjustableSemaphore
public final class AdjustableSemaphore
A semaphore that can be dynamically resized.
| Constructor Summary | |
|---|---|
AdjustableSemaphore(int maxPermits)
Create a new instance of this semaphore. |
|
| Method Summary | |
|---|---|
int |
availablePermits()
|
int |
getMaxPermits()
Retrieves the maximum number of permits. |
void |
setMaxPermits(int maxPermits)
Set the maximum number of permits. |
| Methods inherited from class java.util.concurrent.Semaphore |
|---|
acquire, acquire, acquireUninterruptibly, acquireUninterruptibly, drainPermits, getQueuedThreads, getQueueLength, hasQueuedThreads, isFair, reducePermits, release, release, toString, tryAcquire, tryAcquire, tryAcquire, tryAcquire |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AdjustableSemaphore(int maxPermits)
maxPermits - The initial number of permits.| Method Detail |
|---|
public int getMaxPermits()
public int availablePermits()
availablePermits in class Semaphorepublic void setMaxPermits(int maxPermits)
maxPermits - The maximum number of permits. Must be greater than zero.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||