Class AbortingIndexerLock
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.index.importer.AbortingIndexerLock
-
- All Implemented Interfaces:
AsyncIndexerLock<org.apache.jackrabbit.oak.plugins.index.importer.SimpleToken>
public class AbortingIndexerLock extends java.lang.Object implements AsyncIndexerLock<org.apache.jackrabbit.oak.plugins.index.importer.SimpleToken>
Lock implementation for single node setup like for SegmentNodeStore It works by check async indexer status via IndexStatsMBean and then aborting it if found to be running
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.plugins.index.importer.AsyncIndexerLock
AsyncIndexerLock.LockToken
-
-
Field Summary
Fields Modifier and Type Field Description static int
TIMEOUT_SECONDS
-
Fields inherited from interface org.apache.jackrabbit.oak.plugins.index.importer.AsyncIndexerLock
NOOP_LOCK
-
-
Constructor Summary
Constructors Constructor Description AbortingIndexerLock(AsyncIndexInfoService infoService)
AbortingIndexerLock(AsyncIndexInfoService infoService, Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.jackrabbit.oak.plugins.index.importer.SimpleToken
lock(java.lang.String asyncIndexerLane)
void
unlock(org.apache.jackrabbit.oak.plugins.index.importer.SimpleToken token)
-
-
-
Field Detail
-
TIMEOUT_SECONDS
public static final int TIMEOUT_SECONDS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbortingIndexerLock
public AbortingIndexerLock(AsyncIndexInfoService infoService)
-
AbortingIndexerLock
public AbortingIndexerLock(AsyncIndexInfoService infoService, Clock clock)
-
-
Method Detail
-
lock
public org.apache.jackrabbit.oak.plugins.index.importer.SimpleToken lock(java.lang.String asyncIndexerLane)
- Specified by:
lock
in interfaceAsyncIndexerLock<org.apache.jackrabbit.oak.plugins.index.importer.SimpleToken>
-
unlock
public void unlock(org.apache.jackrabbit.oak.plugins.index.importer.SimpleToken token)
- Specified by:
unlock
in interfaceAsyncIndexerLock<org.apache.jackrabbit.oak.plugins.index.importer.SimpleToken>
-
-