Package org.eclipse.aether.named.support
Class AdaptedSemaphoreNamedLock
java.lang.Object
org.eclipse.aether.named.support.NamedLockSupport
org.eclipse.aether.named.support.AdaptedSemaphoreNamedLock
- All Implemented Interfaces:
AutoCloseable
,NamedLock
Named lock support implementation that is using "adapted" semaphore (to be able to use semaphores not sharing common
API).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Wrapper for semaphore-like stuff, that do not share common ancestor. -
Field Summary
Fields inherited from class org.eclipse.aether.named.support.NamedLockSupport
logger
-
Constructor Summary
ConstructorDescriptionAdaptedSemaphoreNamedLock
(NamedLockKey key, NamedLockFactorySupport factory, AdaptedSemaphoreNamedLock.AdaptedSemaphore semaphore) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
doLockExclusively
(long time, TimeUnit unit) protected boolean
doLockShared
(long time, TimeUnit unit) protected void
doUnlock()
Methods inherited from class org.eclipse.aether.named.support.NamedLockSupport
close, diagnosticState, doClose, key, lockExclusively, lockShared, toString, unlock
-
Constructor Details
-
AdaptedSemaphoreNamedLock
public AdaptedSemaphoreNamedLock(NamedLockKey key, NamedLockFactorySupport factory, AdaptedSemaphoreNamedLock.AdaptedSemaphore semaphore)
-
-
Method Details
-
doLockExclusively
- Specified by:
doLockExclusively
in classNamedLockSupport
- Throws:
InterruptedException
-
doUnlock
- Specified by:
doUnlock
in classNamedLockSupport