public class FileLockBasedLockChecker extends Object implements LockChecker
| 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 @NotNull File |
toFile(int id) |
public static LockChecker getInstance()
public boolean isLockFree(int id)
isLockFree in interface LockCheckerpublic boolean obtainLock(int id,
String metaInfo)
throws IOException
obtainLock in interface LockCheckerIOExceptionpublic boolean releaseLock(int id)
releaseLock in interface LockCheckerpublic String getMetaInfo(int id) throws IOException
getMetaInfo in interface LockCheckerIOException@NotNull protected @NotNull File toFile(int id)
Copyright © 2024. All rights reserved.