Class LocalSemaphoreNamedLockFactory.JVMSemaphore
- java.lang.Object
-
- org.eclipse.aether.named.providers.LocalSemaphoreNamedLockFactory.JVMSemaphore
-
- All Implemented Interfaces:
AdaptedSemaphoreNamedLock.AdaptedSemaphore
- Enclosing class:
- LocalSemaphoreNamedLockFactory
private static final class LocalSemaphoreNamedLockFactory.JVMSemaphore extends java.lang.Object implements AdaptedSemaphoreNamedLock.AdaptedSemaphore
Adapted JVMSemaphore
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.Semaphore
semaphore
-
Constructor Summary
Constructors Modifier Constructor Description private
JVMSemaphore(java.util.concurrent.Semaphore semaphore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
release(int perms)
boolean
tryAcquire(int perms, long time, java.util.concurrent.TimeUnit unit)
-
-
-
Method Detail
-
tryAcquire
public boolean tryAcquire(int perms, long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
- Specified by:
tryAcquire
in interfaceAdaptedSemaphoreNamedLock.AdaptedSemaphore
- Throws:
java.lang.InterruptedException
-
release
public void release(int perms)
- Specified by:
release
in interfaceAdaptedSemaphoreNamedLock.AdaptedSemaphore
-
-