@Singleton @Named(value="file-lock") public class FileLockNamedLockFactory extends NamedLockFactorySupport implements FileSystemFriendly
FileLockNamedLocks. This is a bit special implementation, as it
expects locks names to be fully qualified absolute file system paths.| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.ConcurrentMap<java.lang.String,java.nio.channels.FileChannel> |
fileChannels |
static java.lang.String |
NAME |
logger| Constructor and Description |
|---|
FileLockNamedLockFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected NamedLockSupport |
createLock(java.lang.String name)
Implementations shall create and return
NamedLockSupport for given name, this method must never
return null. |
protected void |
destroyLock(java.lang.String name)
Implementation may override this (empty) method to perform some sort of implementation specific cleanup for
given lock name.
|
closeLock, finalize, getLock, shutdownpublic static final java.lang.String NAME
private final java.util.concurrent.ConcurrentMap<java.lang.String,java.nio.channels.FileChannel> fileChannels
protected NamedLockSupport createLock(java.lang.String name)
NamedLockFactorySupportNamedLockSupport for given name, this method must never
return null.createLock in class NamedLockFactorySupportprotected void destroyLock(java.lang.String name)
NamedLockFactorySupportdestroyLock in class NamedLockFactorySupport