public class SemaphoreWrapper
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
protected java.util.concurrent.atomic.AtomicBoolean |
released |
protected java.util.concurrent.Semaphore |
semaphore |
构造器和说明 |
---|
SemaphoreWrapper() |
SemaphoreWrapper(int permits) |
SemaphoreWrapper(int permits,
boolean fair) |
SemaphoreWrapper(java.util.concurrent.Semaphore semaphore) |
限定符和类型 | 方法和说明 |
---|---|
void |
acquire() |
java.util.concurrent.Semaphore |
getSemaphore() |
boolean |
isRelease() |
void |
release() |
void |
setSemaphore(java.util.concurrent.Semaphore semaphore) |
protected final java.util.concurrent.atomic.AtomicBoolean released
protected java.util.concurrent.Semaphore semaphore