Search in sources :

Example 6 with AsyncIndexUpdate

use of org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate in project jackrabbit-oak by apache.

the class SimpleAsyncReindexer method reindex.

private void reindex(String laneName) {
    AsyncIndexUpdate async = new AsyncIndexUpdate(laneName, getNodeStore(), indexEditorProvider, indexHelper.getStatisticsProvider(), false);
    //TODO Expose the JMX
    boolean done = false;
    while (!done) {
        //TODO Check for timeout
        async.run();
        done = async.isFinished();
    }
}
Also used : AsyncIndexUpdate(org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate)

Aggregations

AsyncIndexUpdate (org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate)6 Test (org.junit.Test)3 MemoryNodeStore (org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore)2 QueryIndexProvider (org.apache.jackrabbit.oak.spi.query.QueryIndexProvider)2 OpenSecurityProvider (org.apache.jackrabbit.oak.spi.security.OpenSecurityProvider)2 NodeStore (org.apache.jackrabbit.oak.spi.state.NodeStore)2 Lists.newArrayList (com.google.common.collect.Lists.newArrayList)1 Closeable (java.io.Closeable)1 File (java.io.File)1 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1 Executor (java.util.concurrent.Executor)1 ScheduledThreadPoolExecutor (java.util.concurrent.ScheduledThreadPoolExecutor)1 ThreadPoolExecutor (java.util.concurrent.ThreadPoolExecutor)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 FileDataStore (org.apache.jackrabbit.core.data.FileDataStore)1 InitialContent (org.apache.jackrabbit.oak.InitialContent)1 Oak (org.apache.jackrabbit.oak.Oak)1 ContentRepository (org.apache.jackrabbit.oak.api.ContentRepository)1 Descriptors (org.apache.jackrabbit.oak.api.Descriptors)1