Examples of Children


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

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

        Node n = ns.getNode("/testDel", Revision.fromString(r1));
        assertNotNull(n);
        Children c = ns.getChildren(n, null, Integer.MAX_VALUE);
        assertEquals(3, c.children.size());

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

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

        } else {
            // use long to avoid overflows
            long m = ((long) maxChildNodes) + offset;
            max = (int) Math.min(m, Integer.MAX_VALUE);
        }
        Children c = nodeStore.getChildren(n, null, max);
        for (long i = offset; i < c.children.size(); i++) {
            if (maxChildNodes-- <= 0) {
                break;
            }
            String name = PathUtils.getName(c.children.get((int) i));
View Full Code Here

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

            }
        }
        // TODO this does not work well for large child node lists
        // use a MongoDB index instead
        int max = MANY_CHILDREN_THRESHOLD;
        Children fromChildren, toChildren;
        fromChildren = nodeStore.getChildren(path, fromRev, max);
        toChildren = nodeStore.getChildren(path, toRev, max);
        if (!fromChildren.hasMore && !toChildren.hasMore) {
            diffFewChildren(w, fromChildren, fromRev, toChildren, toRev);
        } else {
View Full Code Here

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

        } else {
            // use long to avoid overflows
            long m = ((long) maxChildNodes) + offset;
            max = (int) Math.min(m, Integer.MAX_VALUE);
        }
        Children c = nodeStore.getChildren(path, rev, max);
        for (long i = offset; i < c.children.size(); i++) {
            if (maxChildNodes-- <= 0) {
                break;
            }
            String name = PathUtils.getName(c.children.get((int) i));
View Full Code Here

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

            }
        }
        // TODO this does not work well for large child node lists
        // use a MongoDB index instead
        int max = MANY_CHILDREN_THRESHOLD;
        Children fromChildren, toChildren;
        fromChildren = nodeStore.getChildren(path, fromRev, max);
        toChildren = nodeStore.getChildren(path, toRev, max);
        if (!fromChildren.hasMore && !toChildren.hasMore) {
            diffFewChildren(w, fromChildren, fromRev, toChildren, toRev);
        } else {
View Full Code Here

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

        } else {
            // use long to avoid overflows
            long m = ((long) maxChildNodes) + offset;
            max = (int) Math.min(m, Integer.MAX_VALUE);
        }
        Children c = nodeStore.getChildren(path, rev, max);
        for (long i = offset; i < c.children.size(); i++) {
            if (maxChildNodes-- <= 0) {
                break;
            }
            String name = PathUtils.getName(c.children.get((int) i));
View Full Code Here

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

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

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

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

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

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

        }
        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
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.