public class FileLockBasedLockChecker extends FileBasedLockChecker
| Modifier | Constructor and Description |
|---|---|
protected |
FileLockBasedLockChecker() |
| Modifier and Type | Method and Description |
|---|---|
static LockChecker |
getInstance() |
String |
getMetaInfo(int id) |
boolean |
isLockFree(int id) |
boolean |
obtainLock(int id,
String metaInfo) |
boolean |
releaseLock(int id) |
protected File |
toFile(int id) |
public static LockChecker getInstance()
public boolean isLockFree(int id)
isLockFree in interface LockCheckerisLockFree in class FileBasedLockCheckerpublic boolean obtainLock(int id,
String metaInfo)
throws IOException
obtainLock in interface LockCheckerobtainLock in class FileBasedLockCheckerIOExceptionpublic boolean releaseLock(int id)
releaseLock in interface LockCheckerreleaseLock in class FileBasedLockCheckerpublic String getMetaInfo(int id) throws IOException
getMetaInfo in interface LockCheckergetMetaInfo in class FileBasedLockCheckerIOException@NotNull protected File toFile(int id)
toFile in class FileBasedLockCheckerCopyright © 2019. All rights reserved.