Class AsyncIndexUpdate
java.lang.Object
org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Runnable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Index update callback that tries to raise the async status flag when the first index change is detected. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Name of service property which determines the name of Async task -
Constructor Summary
ConstructorsConstructorDescriptionAsyncIndexUpdate
(@NotNull String name, @NotNull NodeStore store, @NotNull IndexEditorProvider provider) AsyncIndexUpdate
(@NotNull String name, @NotNull NodeStore store, @NotNull IndexEditorProvider provider, boolean switchOnSync) AsyncIndexUpdate
(@NotNull String name, @NotNull NodeStore store, @NotNull IndexEditorProvider provider, StatisticsProvider statsProvider, boolean switchOnSync) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
checkValidName
(String asyncName) void
close()
org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.AsyncIndexStats
protected long
getName()
static boolean
isAsyncLaneName
(String asyncName) boolean
isClosed()
boolean
boolean
static String
protected AsyncIndexUpdate.AsyncUpdateCallback
newAsyncUpdateCallback
(NodeStore store, String name, long leaseTimeOut, String beforeCheckpoint, org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.AsyncIndexStats indexStats, AtomicBoolean stopFlag) void
run()
protected AsyncIndexUpdate
setCloseTimeOut
(int timeOutInSec) void
setCorruptIndexHandler
(TrackingCorruptIndexHandler corruptIndexHandler) void
setIndexMBeanRegistration
(IndexMBeanRegistration mbeanRegistration) protected AsyncIndexUpdate
setLeaseTimeOut
(long leaseTimeOut) Milliseconds for the timeoutvoid
setValidatorProviders
(List<ValidatorProvider> validatorProviders) protected boolean
updateIndex
(NodeState before, String beforeCheckpoint, NodeState after, String afterCheckpoint, String afterTime, AsyncIndexUpdate.AsyncUpdateCallback callback, AtomicReference<String> checkpointToReleaseRef)
-
Field Details
-
PROP_ASYNC_NAME
Name of service property which determines the name of Async task- See Also:
-
-
Constructor Details
-
AsyncIndexUpdate
public AsyncIndexUpdate(@NotNull @NotNull String name, @NotNull @NotNull NodeStore store, @NotNull @NotNull IndexEditorProvider provider, boolean switchOnSync) -
AsyncIndexUpdate
public AsyncIndexUpdate(@NotNull @NotNull String name, @NotNull @NotNull NodeStore store, @NotNull @NotNull IndexEditorProvider provider, StatisticsProvider statsProvider, boolean switchOnSync) -
AsyncIndexUpdate
public AsyncIndexUpdate(@NotNull @NotNull String name, @NotNull @NotNull NodeStore store, @NotNull @NotNull IndexEditorProvider provider)
-
-
Method Details
-
checkValidName
-
isAsyncLaneName
-
run
public void run() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
newAsyncUpdateCallback
protected AsyncIndexUpdate.AsyncUpdateCallback newAsyncUpdateCallback(NodeStore store, String name, long leaseTimeOut, String beforeCheckpoint, org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.AsyncIndexStats indexStats, AtomicBoolean stopFlag) -
updateIndex
protected boolean updateIndex(NodeState before, String beforeCheckpoint, NodeState after, String afterCheckpoint, String afterTime, AsyncIndexUpdate.AsyncUpdateCallback callback, AtomicReference<String> checkpointToReleaseRef) throws CommitFailedException - Throws:
CommitFailedException
-
leasify
-
setLeaseTimeOut
Milliseconds for the timeout -
getLeaseTimeOut
protected long getLeaseTimeOut() -
setCloseTimeOut
-
setValidatorProviders
-
setCorruptIndexHandler
-
isClosed
public boolean isClosed() -
getIndexStats
public org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.AsyncIndexStats getIndexStats() -
isFinished
public boolean isFinished() -
isFailing
public boolean isFailing() -
setIndexMBeanRegistration
-
getName
-