Package org.apache.jackrabbit.oak.plugins.index

Examples of org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate


        List<CommitHook> initHooks = new ArrayList<CommitHook>(commitHooks);
        initHooks.add(new EditorHook(CompositeEditorProvider
                .compose(editorProviders)));

        if (asyncIndexing) {
            Runnable task = new AsyncIndexUpdate("async", store, indexEditors);
            WhiteboardUtils.scheduleWithFixedDelay(whiteboard, task, 5, true);
        }

        // FIXME: OAK-810 move to proper workspace initialization
        // initialize default workspace
View Full Code Here


        initHooks.add(new EditorHook(CompositeEditorProvider
                .compose(editorProviders)));

        if (asyncIndexing) {
            String name = "async";
            AsyncIndexUpdate task = new AsyncIndexUpdate(name, store,
                    indexEditors);
            WhiteboardUtils.scheduleWithFixedDelay(whiteboard, task, 5, true);
            WhiteboardUtils.registerMBean(whiteboard, IndexStatsMBean.class,
                    task.getIndexStats(), IndexStatsMBean.TYPE, name);
        }

        // FIXME: OAK-810 move to proper workspace initialization
        // initialize default workspace
        Iterable<WorkspaceInitializer> workspaceInitializers =
View Full Code Here

        List<CommitHook> initHooks = new ArrayList<CommitHook>(commitHooks);
        initHooks.add(new EditorHook(CompositeEditorProvider
                .compose(editorProviders)));

        if (asyncIndexing) {
            Runnable task = new AsyncIndexUpdate("async", store, indexEditors);
            WhiteboardUtils.scheduleWithFixedDelay(whiteboard, task, 5);
        }

        // FIXME: OAK-810 move to proper workspace initialization
        // initialize default workspace
View Full Code Here

        initHooks.add(new EditorHook(CompositeEditorProvider
                .compose(editorProviders)));

        if (asyncIndexing) {
            String name = "async";
            AsyncIndexUpdate task = new AsyncIndexUpdate(name, store,
                    indexEditors);
            WhiteboardUtils.scheduleWithFixedDelay(whiteboard, task, 5, true);
            WhiteboardUtils.registerMBean(whiteboard, IndexStatsMBean.class,
                    task.getIndexStats(), IndexStatsMBean.TYPE, name);
        }

        // FIXME: OAK-810 move to proper workspace initialization
        // initialize default workspace
        Iterable<WorkspaceInitializer> workspaceInitializers =
View Full Code Here

        initHooks.add(new EditorHook(CompositeEditorProvider
                .compose(editorProviders)));

        if (asyncIndexing) {
            String name = "async";
            AsyncIndexUpdate task = new AsyncIndexUpdate(name, store,
                    indexEditors);
            scheduleWithFixedDelay(whiteboard, task, 5, true);
            registerMBean(whiteboard, IndexStatsMBean.class,
                    task.getIndexStats(), IndexStatsMBean.TYPE, name);

            name = "async-reindex";
            task = new AsyncIndexUpdate(name, store, indexEditors, true);
            scheduleWithFixedDelay(whiteboard, task, 5, true);
            registerMBean(whiteboard, IndexStatsMBean.class,
            task.getIndexStats(), IndexStatsMBean.TYPE, name);
        }

        registerMBean(whiteboard, QueryEngineSettingsMBean.class,
                queryEngineSettings, QueryEngineSettingsMBean.TYPE, "settings");
View Full Code Here

        initHooks.add(new EditorHook(CompositeEditorProvider
                .compose(editorProviders)));

        if (asyncIndexing) {
            String name = "async";
            AsyncIndexUpdate task = new AsyncIndexUpdate(name, store,
                    indexEditors);
            WhiteboardUtils.scheduleWithFixedDelay(whiteboard, task, 5, true);
            WhiteboardUtils.registerMBean(whiteboard, IndexStatsMBean.class,
                    task.getIndexStats(), IndexStatsMBean.TYPE, name);
        }

        // FIXME: OAK-810 move to proper workspace initialization
        // initialize default workspace
        Iterable<WorkspaceInitializer> workspaceInitializers =
View Full Code Here

        initHooks.add(new EditorHook(CompositeEditorProvider
                .compose(editorProviders)));

        if (asyncIndexing) {
            String name = "async";
            AsyncIndexUpdate task = new AsyncIndexUpdate(name, store,
                    indexEditors);
            scheduleWithFixedDelay(whiteboard, task, 5, true);
            registerMBean(whiteboard, IndexStatsMBean.class,
                    task.getIndexStats(), IndexStatsMBean.TYPE, name);
        }

        // FIXME: OAK-810 move to proper workspace initialization
        // initialize default workspace
        Iterable<WorkspaceInitializer> workspaceInitializers =
View Full Code Here

        List<CommitHook> initHooks = new ArrayList<CommitHook>(commitHooks);
        initHooks.add(new EditorHook(CompositeEditorProvider
                .compose(editorProviders)));

        if (asyncIndexing) {
            Runnable task = new AsyncIndexUpdate("async", store, indexEditors);
            WhiteboardUtils.scheduleWithFixedDelay(whiteboard, task, 5, true);
        }

        // FIXME: OAK-810 move to proper workspace initialization
        // initialize default workspace
View Full Code Here

        } catch (IllegalArgumentException e) {
            // expected: no index for "foo"
        }

        // run async first time, there are some changes
        AsyncIndexUpdate async = new AsyncIndexUpdate(ASYNC_REINDEX_VALUE,
                store, provider, true);
        async.run();
        assertEquals(ASYNC_REINDEX_VALUE,
                store.getRoot().getChildNode(INDEX_DEFINITIONS_NAME)
                        .getChildNode("foo").getString(ASYNC_PROPERTY_NAME));

        // run async second time, there are no changes, should switch to sync
        async.run();
        assertEquals(null, store.getRoot().getChildNode(INDEX_DEFINITIONS_NAME)
                .getChildNode("foo").getString(ASYNC_PROPERTY_NAME));

        // add content, it should be indexed synchronously
        builder = store.getRoot().builder();
View Full Code Here

        initHooks.add(new EditorHook(CompositeEditorProvider
                .compose(editorProviders)));

        if (asyncIndexing) {
            String name = "async";
            AsyncIndexUpdate task = new AsyncIndexUpdate(name, store,
                    indexEditors);
            scheduleWithFixedDelay(whiteboard, task, 5, true);
            registerMBean(whiteboard, IndexStatsMBean.class,
                    task.getIndexStats(), IndexStatsMBean.TYPE, name);

            PropertyIndexAsyncReindex asyncPI = new PropertyIndexAsyncReindex(
                    new AsyncIndexUpdate("async-reindex", store, indexEditors,
                            true), executor);
            registerMBean(whiteboard, PropertyIndexAsyncReindexMBean.class,
                    asyncPI, PropertyIndexAsyncReindexMBean.TYPE, name);
        }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.