Class AsyncIndexUpdate.AsyncUpdateCallback
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.AsyncUpdateCallback
-
- All Implemented Interfaces:
IndexUpdateCallback,NodeTraversalCallback
- Enclosing class:
- AsyncIndexUpdate
protected static class AsyncIndexUpdate.AsyncUpdateCallback extends Object implements IndexUpdateCallback, NodeTraversalCallback
Index update callback that tries to raise the async status flag when the first index change is detected.- See Also:
- OAK-1292
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.plugins.index.NodeTraversalCallback
NodeTraversalCallback.PathSource
-
-
Field Summary
Fields Modifier and Type Field Description static intLEASE_CHECK_INTERVALInterval in terms of number of nodes traversed after which time would be checked for lease expiry-
Fields inherited from interface org.apache.jackrabbit.oak.plugins.index.IndexUpdateCallback
NOOP
-
Fields inherited from interface org.apache.jackrabbit.oak.plugins.index.NodeTraversalCallback
NOOP
-
-
Constructor Summary
Constructors Constructor Description AsyncUpdateCallback(NodeStore store, String name, long leaseTimeOut, String checkpoint, org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.AsyncIndexStats indexStats, AtomicBoolean forcedStop)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longgetTime()voidindexUpdate()Invoked by theIndexEditorfor every NodeState indexed it.protected voidinitLease()protected voidprepare(String afterCheckpoint)voidsetCheckpoint(String checkpoint)voidsetValidatorProviders(List<ValidatorProvider> validatorProviders)voidtraversedNode(NodeTraversalCallback.PathSource pathSource)
-
-
-
Field Detail
-
LEASE_CHECK_INTERVAL
public static final int LEASE_CHECK_INTERVAL
Interval in terms of number of nodes traversed after which time would be checked for lease expiry- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AsyncUpdateCallback
public AsyncUpdateCallback(NodeStore store, String name, long leaseTimeOut, String checkpoint, org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.AsyncIndexStats indexStats, AtomicBoolean forcedStop)
-
-
Method Detail
-
initLease
protected void initLease() throws CommitFailedException- Throws:
CommitFailedException
-
prepare
protected void prepare(String afterCheckpoint) throws CommitFailedException
- Throws:
CommitFailedException
-
indexUpdate
public void indexUpdate() throws CommitFailedExceptionDescription copied from interface:IndexUpdateCallbackInvoked by theIndexEditorfor every NodeState indexed it.- Specified by:
indexUpdatein interfaceIndexUpdateCallback- Throws:
CommitFailedException
-
traversedNode
public void traversedNode(NodeTraversalCallback.PathSource pathSource) throws CommitFailedException
- Specified by:
traversedNodein interfaceNodeTraversalCallback- Throws:
CommitFailedException
-
getTime
protected long getTime()
-
setCheckpoint
public void setCheckpoint(String checkpoint)
-
setValidatorProviders
public void setValidatorProviders(List<ValidatorProvider> validatorProviders)
-
-