Class ProcessFileLock
java.lang.Object
org.aksw.commons.lock.LockBase
org.aksw.commons.lock.LockBaseRepeat
org.aksw.commons.lock.ProcessFileLock
- All Implemented Interfaces:
Lock
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected booleanFirst, attempt to create the process lock file.voidunlock()Methods inherited from class LockBaseRepeat
tryLock, tryLockActual
-
Field Details
-
lock
-
thread
-
-
Constructor Details
-
ProcessFileLock
-
-
Method Details
-
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() -
lockInterruptibly
- Specified by:
lockInterruptiblyin interfaceLock- Overrides:
lockInterruptiblyin classLockBase- Throws:
InterruptedException
-
newCondition
- Specified by:
newConditionin interfaceLock- Overrides:
newConditionin classLockBase
-