Examples of EditorHook


Examples of org.apache.jackrabbit.oak.spi.commit.EditorHook

        OakInitializer.initialize(store, new CompositeInitializer(initializers), indexEditors);

        QueryIndexProvider indexProvider = CompositeQueryIndexProvider.compose(queryIndexProviders);

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

        if (asyncIndexing) {
            String name = "async";
            AsyncIndexUpdate task = new AsyncIndexUpdate(name, store,
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.commit.EditorHook

            copyNodeTypes(builder);
            copyVersionStore(builder);
            copyWorkspaces(builder);

            branch.setRoot(builder.getNodeState());
            branch.merge(new EditorHook(new RegistrationEditorProvider())); // TODO: default hooks?
        } catch (Exception e) {
            throw new RepositoryException("Failed to copy content", e);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.commit.EditorHook

     * order while still being able to leverage the performance gains of
     * multiple editors iterating over the changes simultaneously.
     */
    private void withEditorHook() {
        if (!editorProviders.isEmpty()) {
            commitHooks.add(new EditorHook(
                    CompositeEditorProvider.compose(editorProviders)));
            editorProviders = newArrayList();
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.commit.EditorHook

        OakInitializer.initialize(store, new CompositeInitializer(initializers), indexEditors);

        QueryIndexProvider indexProvider = CompositeQueryIndexProvider.compose(queryIndexProviders);

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

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

Examples of org.apache.jackrabbit.oak.spi.commit.EditorHook

    @Override
    public void run() {
        log.debug("Running background index config watcher task");
        NodeState after = store.getRoot();
        try {
            EditorHook hook = new EditorHook(new EditorProvider() {
                @Override
                public Editor getRootEditor(NodeState before, NodeState after,
                        NodeBuilder builder) {
                    return VisibleEditor.wrap(new IndexConfigWatcher());
                }
            });
            hook.processCommit(current, after);
            current = after;
        } catch (CommitFailedException e) {
            log.warn("IndexTask update failed", e);
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.commit.EditorHook

        public void run() {
            log.debug("Running background index task for type {}.", type);
            NodeStoreBranch branch = store.branch();
            NodeState after = branch.getHead();
            try {
                EditorHook hook = new EditorHook(new TypedEditorProvider(
                        provider, type));
                NodeState processed = hook.processCommit(before, after);
                branch.setRoot(processed);
                branch.merge(EmptyHook.INSTANCE);
                before = after;
            } catch (CommitFailedException e) {
                log.warn("IndexTask update failed", e);
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.commit.EditorHook

        this.oak = oak;

        with(new InitialContent());

        with(JcrConflictHandler.JCR_CONFLICT_HANDLER);
        with(new EditorHook(new VersionEditorProvider()));

        with(new SecurityProviderImpl());

        with(new NameValidatorProvider());
        with(new NamespaceValidatorProvider());
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.commit.EditorHook

        try {
            branch.merge(EmptyHook.INSTANCE);
        } catch (CommitFailedException e) {
            throw new RuntimeException(e);
        }
        BuiltInNodeTypes.register(new RootImpl(store, new EditorHook(new RegistrationEditorProvider())));
        return store.getRoot();
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.commit.EditorHook

            public Editor getRootEditor(NodeState before, NodeState after,
                    NodeBuilder builder) {
                return new SolrIndexHook("/", builder, server);
            }
        };
        EditorHook hook = new EditorHook(provider);
        NodeState indexed = hook.processCommit(before, after);

        IndexDefinition testDef = new IndexDefinitionImpl("solr",
                "solr", "/oak:index/solr");
        QueryIndex queryIndex = new SolrQueryIndex(testDef, server, configuration);
        FilterImpl filter = new FilterImpl(null, null);
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.commit.EditorHook

            public Editor getRootEditor(NodeState before, NodeState after,
                    NodeBuilder builder) {
                return new SolrIndexHook("/", builder, server);
            }
        };
        EditorHook hook = new EditorHook(provider);
        NodeState indexed = hook.processCommit(before, after);

        IndexDefinition testDef = new IndexDefinitionImpl("solr",
                "solr", "/oak:index/solr");
        QueryIndex queryIndex = new SolrQueryIndex(testDef, server, configuration);
        FilterImpl filter = new FilterImpl(null, null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.