public abstract class NamedLockFactorySupport extends Object implements NamedLockFactory
NamedLockFactory implementations providing reference counting.| Constructor and Description |
|---|
NamedLockFactorySupport() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeLock(String name) |
protected abstract NamedLockSupport |
createLock(String name)
Implementations shall create and return
NamedLockSupport for given name, this method must never
return null. |
protected void |
destroyLock(String name)
Implementation may override this (empty) method to perform some sort of implementation specific cleanup for
given lock name.
|
protected void |
finalize() |
NamedLockSupport |
getLock(String name)
Creates or reuses existing
NamedLock. |
void |
shutdown()
Performs a clean shut down of the factory.
|
public NamedLockFactorySupport()
public NamedLockSupport getLock(String name)
NamedLockFactoryNamedLock. Returns instance MUST BE treated as "resource", best in
try-with-resource block.getLock in interface NamedLockFactoryname - the lock name, must not be null.null.public void shutdown()
NamedLockFactoryshutdown in interface NamedLockFactoryprotected abstract NamedLockSupport createLock(String name)
NamedLockSupport for given name, this method must never
return null.protected void destroyLock(String name)
Copyright © 2010–2022 The Apache Software Foundation. All rights reserved.