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 int
LEASE_CHECK_INTERVAL
Interval 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 long
getTime()
void
indexUpdate()
Invoked by theIndexEditor
for every NodeState indexed it.protected void
initLease()
protected void
prepare(String afterCheckpoint)
void
setCheckpoint(String checkpoint)
void
setValidatorProviders(List<ValidatorProvider> validatorProviders)
void
traversedNode(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 CommitFailedException
Description copied from interface:IndexUpdateCallback
Invoked by theIndexEditor
for every NodeState indexed it.- Specified by:
indexUpdate
in interfaceIndexUpdateCallback
- Throws:
CommitFailedException
-
traversedNode
public void traversedNode(NodeTraversalCallback.PathSource pathSource) throws CommitFailedException
- Specified by:
traversedNode
in interfaceNodeTraversalCallback
- Throws:
CommitFailedException
-
getTime
protected long getTime()
-
setCheckpoint
public void setCheckpoint(String checkpoint)
-
setValidatorProviders
public void setValidatorProviders(List<ValidatorProvider> validatorProviders)
-
-