public class FileLock
extends java.lang.Object
Constructor and Description |
---|
FileLock(java.io.File clientDir,
java.lang.String lockFilename)
Creates an NIO FileLock on the specified file if on a suitable Java runtime.
|
Modifier and Type | Method and Description |
---|---|
void |
release()
Releases the lock.
|
public FileLock(java.io.File clientDir, java.lang.String lockFilename) throws java.lang.Exception
clientDir
- the a File of the directory to contain the lock file.lockFilename
- name of the the file to lockjava.lang.Exception
- if the lock could not be obtained for any reason