Package org.eclipse.aether.named
Interface NamedLockFactory
-
- All Known Implementing Classes:
FileLockNamedLockFactory,LocalReadWriteLockNamedLockFactory,LocalSemaphoreNamedLockFactory,NamedLockFactorySupport,NoopNamedLockFactory
public interface NamedLockFactoryA factory ofNamedLocks.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NamedLockgetLock(java.lang.String name)Creates or reuses existingNamedLock.voidshutdown()Performs a clean shut down of the factory.
-
-
-
Method Detail
-
getLock
NamedLock getLock(java.lang.String name)
Creates or reuses existingNamedLock. Returns instance MUST BE treated as "resource", best in try-with-resource block.- Parameters:
name- the lock name, must not benull.- Returns:
- named lock instance, never
null.
-
shutdown
void shutdown()
Performs a clean shut down of the factory.
-
-