Package org.apache.jackrabbit.oak.plugins.memory

Examples of org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore.branch()


    @Override
    public NodeState initialize(NodeState workspaceRoot, String workspaceName,
                                QueryIndexProvider indexProvider,
                                CommitHook commitHook) {
        MemoryNodeStore store = new MemoryNodeStore();
        NodeStoreBranch branch = store.branch();
        branch.setRoot(workspaceRoot);
        try {
            branch.merge(EmptyHook.INSTANCE, PostCommitHook.EMPTY);
        } catch (CommitFailedException e) {
            throw new RuntimeException(e);
View Full Code Here


                    ImmutableList.of(JCR_PRIMARYTYPE, JCR_MIXINTYPES), null);
            // the cost of using the property index for "@primaryType is not null" is very high
            nt.setProperty(IndexConstants.ENTRY_COUNT_PROPERTY_NAME, Long.valueOf(Long.MAX_VALUE));
        }
        NodeStore store = new MemoryNodeStore();
        NodeStoreBranch branch = store.branch();
        branch.setRoot(root.getNodeState());
        try {
            branch.merge(EmptyHook.INSTANCE, PostCommitHook.EMPTY);
        } catch (CommitFailedException e) {
            throw new RuntimeException(e);
View Full Code Here

        if (!system.hasChildNode(REP_PRIVILEGES)) {
            NodeBuilder privileges = system.child(REP_PRIVILEGES);
            privileges.setProperty(JcrConstants.JCR_PRIMARYTYPE, NT_REP_PRIVILEGES, Type.NAME);

            NodeStore store = new MemoryNodeStore();
            NodeStoreBranch branch = store.branch();
            try {
                branch.setRoot(root.getNodeState());
                branch.merge(EmptyHook.INSTANCE, PostCommitHook.EMPTY);
            } catch (CommitFailedException e) {
                log.error("Failed to initialize privilege content ", e);
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.