Package org.apache.jackrabbit.oak.plugins.mongomk.Node

Examples of org.apache.jackrabbit.oak.plugins.mongomk.Node.Children


    @Test
    public void nodeChildWithoutChildren() throws Exception {
        measureMemory(new Callable<Object[]>() {
            @Override
            public Object[] call() {
                Children n = generateNodeChild(0);
                return new Object[]{n, n.getMemory() + OVERHEAD};
            }
        });
    }
View Full Code Here


        }
        return n;
    }

    static Children generateNodeChild(int childCount) {
        Children n = new Children();
        for (int i = 0; i < childCount; i++) {
            n.children.add("child" + i);
        }
        return n;
    }
View Full Code Here

        assertEquals("{\"name\":\"Hello\",\":childNodeCount\":0}", test);
       
        String r0 = mk.commit("/test", "+\"a\":{\"name\": \"World\"}", null, null);
        String r1 = mk.commit("/test", "+\"b\":{\"name\": \"!\"}", null, null);
        test = mk.getNodes("/test", r0, 0, 0, Integer.MAX_VALUE, null);
        Children c;
        c = mk.getChildren("/", Revision.fromString(r0), Integer.MAX_VALUE);
        assertEquals("[/test]", c.toString());
        c = mk.getChildren("/test", Revision.fromString(r1), Integer.MAX_VALUE);
        assertEquals("[/test/a, /test/b]", c.toString());

        rev = mk.commit("", "^\"/test\":1", null, null);
        test = mk.getNodes("/", rev, 0, 0, Integer.MAX_VALUE, null);
        assertEquals("{\"test\":1,\"test\":{},\":childNodeCount\":1}", test);
View Full Code Here

        mk.commit("/", "+\"testDel\":{\"name\": \"Hello\"}", null, null);
        mk.commit("/testDel", "+\"a\":{\"name\": \"World\"}", null, null);
        mk.commit("/testDel", "+\"b\":{\"name\": \"!\"}", null, null);
        String r1 = mk.commit("/testDel", "+\"c\":{\"name\": \"!\"}", null, null);

        Children c = mk.getChildren("/testDel", Revision.fromString(r1),
                Integer.MAX_VALUE);
        assertEquals(3, c.children.size());

        String r2 = mk.commit("/testDel", "-\"c\"", null, null);
        c = mk.getChildren("/testDel", Revision.fromString(r2),
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.mongomk.Node.Children

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.