Class LockFromFile
java.lang.Object
org.aksw.commons.lock.LockBase
org.aksw.commons.lock.LockBaseRepeat
org.aksw.commons.lock.db.impl.LockFromFile
- All Implemented Interfaces:
Lock
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLockFromFile(Path path) LockFromFile(Path path, ThrowingConsumer<Path> fileCreator) -
Method Summary
Methods inherited from class LockBaseRepeat
tryLock, tryLockActualMethods inherited from class LockBase
lock, lockInterruptibly, newCondition, tryLock
-
Field Details
-
path
-
fileCreator
-
-
Constructor Details
-
LockFromFile
-
LockFromFile
-
-
Method Details
-
getPath
-
singleLockAttempt
First, attempt to create the process lock file. If the manager already owns it then this step succeeds immediately without further waiting. Afterwards, attempt to get the thread lock- Specified by:
singleLockAttemptin classLockBaseRepeat- Throws:
InterruptedException
-
unlock
public void unlock()
-