|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.littleshoot.util.FileLockUtils
public class FileLockUtils
Utility methods for dealing with file locks.
| Method Summary | |
|---|---|
static void |
callWithLock(File file,
LockedFileRunner runner)
Calls the specified Runnable only when a lock is obtained on
the specified file. |
static void |
callWithLock(File file,
LockedFileRunner runner,
boolean truncate)
Calls the specified Runnable only when a lock is obtained on
the specified file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void callWithLock(File file,
LockedFileRunner runner)
Runnable only when a lock is obtained on
the specified file.
file - The file to obtain a lock on.runner - The class to call when we have the lock.
public static void callWithLock(File file,
LockedFileRunner runner,
boolean truncate)
Runnable only when a lock is obtained on
the specified file.
file - The file to obtain a lock on.runner - The class to call when we have the lock.truncate - Whether or not to truncate the file when we're done --
useful in some file IPC scenarios.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||