public class LockFile
extends java.lang.Object
implements java.io.Closeable
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases the lock file.
|
static LockFile |
lock(java.nio.file.Path lockFile)
Creates a lock file.
|
public static LockFile lock(java.nio.file.Path lockFile) throws java.io.IOException
lockFile
- the path of the lock fileLockFile
that can be released laterjava.io.IOException
- if creating the lock file failspublic void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable