Class ClusterNodeStoreLock
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.index.importer.ClusterNodeStoreLock
-
- All Implemented Interfaces:
AsyncIndexerLock<org.apache.jackrabbit.oak.plugins.index.importer.ClusteredLockToken>
public class ClusterNodeStoreLock extends java.lang.Object implements AsyncIndexerLock<org.apache.jackrabbit.oak.plugins.index.importer.ClusteredLockToken>
Lock implementation for clustered scenario. The locking is done by setting the lease time for the lane to distant future which prevent AsyncIndexUpdate from running.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.plugins.index.importer.AsyncIndexerLock
AsyncIndexerLock.LockToken
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.plugins.index.importer.AsyncIndexerLock
NOOP_LOCK
-
-
Constructor Summary
Constructors Constructor Description ClusterNodeStoreLock(NodeStore nodeStore)
ClusterNodeStoreLock(NodeStore nodeStore, Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isLocked(java.lang.String asyncIndexerLane)
org.apache.jackrabbit.oak.plugins.index.importer.ClusteredLockToken
lock(java.lang.String asyncIndexerLane)
void
unlock(org.apache.jackrabbit.oak.plugins.index.importer.ClusteredLockToken token)
-
-
-
Method Detail
-
lock
public org.apache.jackrabbit.oak.plugins.index.importer.ClusteredLockToken lock(java.lang.String asyncIndexerLane) throws CommitFailedException
- Specified by:
lock
in interfaceAsyncIndexerLock<org.apache.jackrabbit.oak.plugins.index.importer.ClusteredLockToken>
- Throws:
CommitFailedException
-
unlock
public void unlock(org.apache.jackrabbit.oak.plugins.index.importer.ClusteredLockToken token) throws CommitFailedException
- Specified by:
unlock
in interfaceAsyncIndexerLock<org.apache.jackrabbit.oak.plugins.index.importer.ClusteredLockToken>
- Throws:
CommitFailedException
-
isLocked
public boolean isLocked(java.lang.String asyncIndexerLane)
-
-