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

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


                    ImmutableList.<String>of(JCR_UUID), null);
            IndexUtils.createIndexDefinition(index, "nodetype", true, false,
                    ImmutableList.of(JCR_PRIMARYTYPE, JCR_MIXINTYPES), null);
        }
        NodeStore store = new MemoryNodeStore();
        NodeStoreBranch branch = store.branch();
        branch.setRoot(root.getNodeState());
        try {
            branch.merge(EmptyHook.INSTANCE);
        } 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);
            } catch (CommitFailedException e) {
                log.error("Failed to initialize privilege content ", e);
View Full Code Here

    @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);
        } catch (CommitFailedException e) {
            throw new RuntimeException(e);
View Full Code Here

    public void testAsync() throws Exception {
        NodeStore store = new MemoryNodeStore();
        ScheduledExecutorService executor = Executors.newScheduledThreadPool(0);
        IndexEditorProvider provider = new PropertyIndexEditorProvider();

        NodeStoreBranch branch = store.branch();
        NodeState root = branch.getHead();
        NodeBuilder builder = root.builder();
        createIndexDefinition(builder.child(INDEX_DEFINITIONS_NAME),
                "rootIndex", true, false, ImmutableSet.of("foo"), null)
                .setProperty(ASYNC_PROPERTY_NAME, true);
View Full Code Here

    public void testAsyncDouble() throws Exception {
        NodeStore store = new MemoryNodeStore();
        ScheduledExecutorService executor = Executors.newScheduledThreadPool(0);
        IndexEditorProvider provider = new PropertyIndexEditorProvider();

        NodeStoreBranch branch = store.branch();
        NodeState root = branch.getHead();
        NodeBuilder builder = root.builder();
        createIndexDefinition(builder.child(INDEX_DEFINITIONS_NAME),
                "rootIndex", true, false, ImmutableSet.of("foo"), null)
                .setProperty(ASYNC_PROPERTY_NAME, true);
View Full Code Here

    public void testAsyncDoubleSubtree() throws Exception {
        NodeStore store = new MemoryNodeStore();
        ScheduledExecutorService executor = Executors.newScheduledThreadPool(0);
        IndexEditorProvider provider = new PropertyIndexEditorProvider();

        NodeStoreBranch branch = store.branch();
        NodeState root = branch.getHead();
        NodeBuilder builder = root.builder();
        createIndexDefinition(builder.child(INDEX_DEFINITIONS_NAME),
                "rootIndex", true, false, ImmutableSet.of("foo"), null)
                .setProperty(ASYNC_PROPERTY_NAME, true);
View Full Code Here

    @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);
        } catch (CommitFailedException e) {
            throw new RuntimeException(e);
View Full Code Here

    @Test
    public void testAsync() throws Exception {
        NodeStore store = new MemoryNodeStore();
        IndexEditorProvider provider = new PropertyIndexEditorProvider();

        NodeStoreBranch branch = store.branch();
        NodeState root = branch.getHead();
        NodeBuilder builder = root.builder();
        createIndexDefinition(builder.child(INDEX_DEFINITIONS_NAME),
                "rootIndex", true, false, ImmutableSet.of("foo"), null)
                .setProperty(ASYNC_PROPERTY_NAME, "async");
View Full Code Here

    @Test
    public void testAsyncDouble() throws Exception {
        NodeStore store = new MemoryNodeStore();
        IndexEditorProvider provider = new PropertyIndexEditorProvider();

        NodeStoreBranch branch = store.branch();
        NodeState root = branch.getHead();
        NodeBuilder builder = root.builder();
        createIndexDefinition(builder.child(INDEX_DEFINITIONS_NAME),
                "rootIndex", true, false, ImmutableSet.of("foo"), null)
                .setProperty(ASYNC_PROPERTY_NAME, "async");
View Full Code Here

    @Test
    public void testAsyncDoubleSubtree() throws Exception {
        NodeStore store = new MemoryNodeStore();
        IndexEditorProvider provider = new PropertyIndexEditorProvider();

        NodeStoreBranch branch = store.branch();
        NodeState root = branch.getHead();
        NodeBuilder builder = root.builder();
        createIndexDefinition(builder.child(INDEX_DEFINITIONS_NAME),
                "rootIndex", true, false, ImmutableSet.of("foo"), null)
                .setProperty(ASYNC_PROPERTY_NAME, "async");
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.