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 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
ConstructorsConstructorDescriptionClusterNodeStoreLock(NodeStore nodeStore) ClusterNodeStoreLock(NodeStore nodeStore, Clock clock) -
Method Summary
-
Constructor Details
-
ClusterNodeStoreLock
-
ClusterNodeStoreLock
-
-
Method Details
-
lock
public org.apache.jackrabbit.oak.plugins.index.importer.ClusteredLockToken lock(String asyncIndexerLane) throws CommitFailedException - Specified by:
lockin 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:
unlockin interfaceAsyncIndexerLock<org.apache.jackrabbit.oak.plugins.index.importer.ClusteredLockToken>- Throws:
CommitFailedException
-
isLocked
-