private static final class LocalSemaphoreNamedLockFactory.JVMSemaphore extends java.lang.Object implements AdaptedSemaphoreNamedLock.AdaptedSemaphore
Semaphore
.Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.Semaphore |
semaphore |
Modifier | Constructor and Description |
---|---|
private |
JVMSemaphore(java.util.concurrent.Semaphore semaphore) |
Modifier and Type | Method and Description |
---|---|
void |
release(int perms) |
boolean |
tryAcquire(int perms,
long time,
java.util.concurrent.TimeUnit unit) |
public boolean tryAcquire(int perms, long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
tryAcquire
in interface AdaptedSemaphoreNamedLock.AdaptedSemaphore
java.lang.InterruptedException
public void release(int perms)
release
in interface AdaptedSemaphoreNamedLock.AdaptedSemaphore