Package org.apache.jackrabbit.oak.spi.state

Examples of org.apache.jackrabbit.oak.spi.state.NodeStore.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

    private NodeState state;

    @Before
    public void setUp() throws CommitFailedException {
        NodeStore store = new KernelNodeStore(new MicroKernelImpl());
        NodeStoreBranch branch = store.branch();

        NodeBuilder builder = branch.getHead().builder();
        builder.setProperty("a", 1);
        builder.setProperty("b", 2);
        builder.setProperty("c", 3);
View Full Code Here

    private NodeState state;

    @Before
    public void setUp() throws CommitFailedException {
        NodeStore store = new KernelNodeStore(new MicroKernelImpl());
        NodeStoreBranch branch = store.branch();

        NodeBuilder builder = branch.getHead().builder();
        builder.setProperty("a", 1);
        for (int i = 0; i <= N; i++) {
            builder.child("x" + i);
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

    private NodeState state;

    @Before
    public void setUp() throws CommitFailedException {
        NodeStore store = new KernelNodeStore(new MicroKernelImpl());
        NodeStoreBranch branch = store.branch();

        NodeBuilder builder = branch.getRoot().builder();
        builder.setProperty("a", 1);
        builder.setProperty("b", 2);
        builder.setProperty("c", 3);
View Full Code Here

    private NodeState state;

    @Before
    public void setUp() throws CommitFailedException {
        NodeStore store = new KernelNodeStore(new MicroKernelImpl());
        NodeStoreBranch branch = store.branch();

        NodeBuilder builder = branch.getRoot().builder();
        builder.setProperty("a", 1);
        for (int i = 0; i <= N; i++) {
            builder.child("x" + i);
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

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.