public abstract class FileBasedLockStrategy extends AbstractLockStrategy
| Modifier and Type | Class and Description |
|---|---|
static class |
FileBasedLockStrategy.CreateFileLocker
"locks" a file by creating it if it doesn't exist, relying on the
File.createNewFile() atomicity. |
static interface |
FileBasedLockStrategy.FileLocker |
static class |
FileBasedLockStrategy.NIOFileLocker
Locks a file using the
FileLock mechanism. |
| Modifier | Constructor and Description |
|---|---|
protected |
FileBasedLockStrategy() |
protected |
FileBasedLockStrategy(boolean debugLocking) |
protected |
FileBasedLockStrategy(FileBasedLockStrategy.FileLocker locker,
boolean debugLocking) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
acquireLock(java.io.File file) |
protected java.lang.String |
getCurrentLockHolderNames(java.io.File file)
Return a string naming the threads which currently hold this lock.
|
protected void |
releaseLock(java.io.File file) |
getName, isDebugLocking, setName, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitlockArtifact, unlockArtifactprotected FileBasedLockStrategy()
protected FileBasedLockStrategy(boolean debugLocking)
protected FileBasedLockStrategy(FileBasedLockStrategy.FileLocker locker, boolean debugLocking)
protected boolean acquireLock(java.io.File file)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionprotected void releaseLock(java.io.File file)
protected java.lang.String getCurrentLockHolderNames(java.io.File file)