Class LockStoreImpl.ResourceLockImpl
java.lang.Object
org.aksw.commons.lock.db.impl.LockStoreImpl.ResourceLockImpl
- All Implemented Interfaces:
ResourceLock<String>
- Enclosing class:
LockStoreImpl
- Author:
- Claus Stadler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LockFromLockStorecreateLockOwner(String ownerKey) Get an exclusive lock on the lock which prevents concurent modification of the state of the read locks or the write lock.getOwnerKey(Path linkFile) null if the write lock is not ownedlinkTargetToKey(Path path) Owner to lock
-
Field Details
-
lockKey
-
lockAbsPath
-
mgmtLockPath
The management lock file which when exists prevents modification of the read/write lock ownerships by other processes -
writeLockPath
-
-
Constructor Details
-
ResourceLockImpl
-
-
Method Details
-
getMgmtLockOwnerKey
Description copied from interface:ResourceLockGet an exclusive lock on the lock which prevents concurent modification of the state of the read locks or the write lock. This means that theandinvalid reference
#acquireReadLock(Object)methods both need to acquire the management lock firstinvalid reference
#acquireWriteLock(Object)- Specified by:
getMgmtLockOwnerKeyin interfaceResourceLock<String>- Returns:
-
getWriteLock
-
get
- Specified by:
getin interfaceResourceLock<String>
-
streamReadLockPaths
- Throws:
IOException
-
linkTargetToKey
-
getOwnerKey
-
streamReadLockOwnerKeys
Description copied from interface:ResourceLockOwner to lock- Specified by:
streamReadLockOwnerKeysin interfaceResourceLock<String>- Throws:
IOException
-
getWriteLockOwnerKey
Description copied from interface:ResourceLocknull if the write lock is not owned- Specified by:
getWriteLockOwnerKeyin interfaceResourceLock<String>- Throws:
IOException
-
createLockOwner
-