Package org.eclipse.aether.named.support
Class NamedLockSupport
java.lang.Object
org.eclipse.aether.named.support.NamedLockSupport
- All Implemented Interfaces:
AutoCloseable
,NamedLock
- Direct Known Subclasses:
AdaptedSemaphoreNamedLock
,FileLockNamedLock
,ReadWriteLockNamedLock
Support class for
NamedLock
implementations providing reference counting.-
Field Details
-
logger
-
-
Constructor Details
-
NamedLockSupport
-
-
Method Details
-
name
Description copied from interface:NamedLock
Returns this instance name, never null -
close
Description copied from interface:NamedLock
Closes the lock resource. Lock MUST be unlocked usingNamedLock.unlock()
in case any locking happened on it. After invoking this method, the lock instance MUST NOT be used anymore. If lock for same name needed, a new instance should be obtained from factory usingNamedLockFactory.getLock(String)
. Ideally, instances are to be used within try-with-resource blocks, so calling this method directly is not really needed, nor advised.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceNamedLock
-