Package org.eclipse.aether.named.support
Class CompositeNamedLock
java.lang.Object
org.eclipse.aether.named.support.NamedLockSupport
org.eclipse.aether.named.support.CompositeNamedLock
- All Implemented Interfaces:
AutoCloseable
,NamedLock
Implementation of composite lock when "composition" is needed for locks that are naturally mapped as 1:1 name
vs some backing implementation. Instances of these locks are "unique per call" and are not ref counted.
- Since:
- 2.0.0
-
Field Summary
Fields inherited from class org.eclipse.aether.named.support.NamedLockSupport
logger
-
Constructor Summary
ConstructorDescriptionCompositeNamedLock
(NamedLockKey key, NamedLockFactorySupport factory, Collection<NamedLock> namedLocks) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doClose()
protected 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, key, lockExclusively, lockShared, toString, unlock
-
Constructor Details
-
CompositeNamedLock
public CompositeNamedLock(NamedLockKey key, NamedLockFactorySupport factory, Collection<NamedLock> namedLocks)
-
-
Method Details
-
doLockExclusively
- Specified by:
doLockExclusively
in classNamedLockSupport
- Throws:
InterruptedException
-
doUnlock
- Specified by:
doUnlock
in classNamedLockSupport
-
doClose
- Overrides:
doClose
in classNamedLockSupport