Class AsyncIndexUpdate
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AsyncIndexUpdate.AsyncUpdateCallback
Index 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 String
PROP_ASYNC_NAME
Name 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 String
checkValidName(String asyncName)
void
close()
org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.AsyncIndexStats
getIndexStats()
protected long
getLeaseTimeOut()
String
getName()
static boolean
isAsyncLaneName(String asyncName)
boolean
isClosed()
boolean
isFailing()
boolean
isFinished()
static String
leasify(String name)
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 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:
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
-
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()
-
-