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 classIndex update callback that tries to raise the async status flag when the first index change is detected. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName 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 StringcheckValidName(String asyncName) voidclose()org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.AsyncIndexStatsprotected longgetName()static booleanisAsyncLaneName(String asyncName) booleanisClosed()booleanbooleanstatic Stringprotected AsyncIndexUpdate.AsyncUpdateCallbacknewAsyncUpdateCallback(NodeStore store, String name, long leaseTimeOut, String beforeCheckpoint, org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.AsyncIndexStats indexStats, AtomicBoolean stopFlag) voidrun()protected AsyncIndexUpdatesetCloseTimeOut(int timeOutInSec) voidsetCorruptIndexHandler(TrackingCorruptIndexHandler corruptIndexHandler) voidsetIndexMBeanRegistration(IndexMBeanRegistration mbeanRegistration) protected AsyncIndexUpdatesetLeaseTimeOut(long leaseTimeOut) Milliseconds for the timeoutvoidsetValidatorProviders(List<ValidatorProvider> validatorProviders) protected booleanupdateIndex(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:
closein interfaceAutoCloseable- Specified by:
closein 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
-