public interface FileLock extends Closeable, FileAccess
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this lock, releasing the lock and any resources associated with it.
|
boolean |
getUnlockedCleanly()
Returns true if the most recent
FileAccess.writeToFile(Runnable) by any process succeeded (ie a process did not crash while updating
the target file). |
boolean |
isLockFile(File file)
Returns true if the given file is used by this lock.
|
readFromFile, readFromFile, writeToFileboolean getUnlockedCleanly()
FileAccess.writeToFile(Runnable) by any process succeeded (ie a process did not crash while updating
the target file). Returns false if FileAccess.writeToFile(Runnable) has never been called for the target file.boolean isLockFile(File file)
void close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2013. All rights reserved