Class AsyncIndexUpdate
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAsyncIndexUpdate.AsyncUpdateCallbackIndex update callback that tries to raise the async status flag when the first index change is detected.
-
Field Summary
Fields Modifier and Type Field Description static StringPROP_ASYNC_NAMEName of service property which determines the name of Async task
-
Constructor Summary
Constructors Constructor Description AsyncIndexUpdate(@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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringcheckValidName(String asyncName)voidclose()org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.AsyncIndexStatsgetIndexStats()protected longgetLeaseTimeOut()StringgetName()static booleanisAsyncLaneName(String asyncName)booleanisClosed()booleanisFailing()booleanisFinished()static Stringleasify(String name)protected 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 Detail
-
PROP_ASYNC_NAME
public static final String PROP_ASYNC_NAME
Name of service property which determines the name of Async task- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
isAsyncLaneName
public static boolean isAsyncLaneName(String asyncName)
-
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
-
setLeaseTimeOut
protected AsyncIndexUpdate setLeaseTimeOut(long leaseTimeOut)
Milliseconds for the timeout
-
getLeaseTimeOut
protected long getLeaseTimeOut()
-
setCloseTimeOut
protected AsyncIndexUpdate setCloseTimeOut(int timeOutInSec)
-
setValidatorProviders
public void setValidatorProviders(List<ValidatorProvider> validatorProviders)
-
setCorruptIndexHandler
public void setCorruptIndexHandler(TrackingCorruptIndexHandler corruptIndexHandler)
-
isClosed
public boolean isClosed()
-
getIndexStats
public org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.AsyncIndexStats getIndexStats()
-
isFinished
public boolean isFinished()
-
isFailing
public boolean isFailing()
-
setIndexMBeanRegistration
public void setIndexMBeanRegistration(IndexMBeanRegistration mbeanRegistration)
-
getName
public String getName()
-
-