public class FileBasedLock extends Object
| Constructor and Description |
|---|
FileBasedLock(String path)
Initializes an instance of FileBasedLock.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getPath()
Returns path to a file to be used to lock.
|
void |
lock()
Lock.
|
void |
release()
Release lock.
|
public FileBasedLock(String path)
path - Path to a file to be used to lockpublic void lock()
throws LockException
LockException - an exception if a file is already set up as a lock.public void release()
throws LockException
LockException - an exception if a file is already set up as a lock.public String getPath()
Copyright © 2019 Java Keyring. All rights reserved.