Package org.apache.jackrabbit.core.persistence.pool

Examples of org.apache.jackrabbit.core.persistence.pool.AbstractBundlePersistenceManager


                PersistenceManager pm = (PersistenceManager) m.invoke(info, new Object[0]);
                if (!(pm instanceof AbstractBundlePersistenceManager)) {
                    log("PM skipped: " + pm.getClass());
                    continue;
                }
                AbstractBundlePersistenceManager apm = (AbstractBundlePersistenceManager) pm;
                log("PM: " + pm.getClass().getName());

                log("All nodes in one step");
                NodeId after = null;
                NodeId first = null;
                for (NodeId id : apm.getAllNodeIds(null, 0)) {
                    log("  " + id);
                    if (first == null) {
                        // initialize first node id
                        first = id;
                    }
                    if (after != null) {
                        assertFalse(id.compareTo(after) == 0);
                    }
                    after = id;
                }

                // start with first
                after = first;
                log("All nodes using batches");
                while (true) {
                    log(" bigger than: " + after);
                    Iterator<NodeId> it = apm.getAllNodeIds(after, 2).iterator();
                    if (!it.hasNext()) {
                        break;
                    }
                    while (it.hasNext()) {
                        NodeId id = it.next();
                        log("    " + id);
                        assertFalse(id.compareTo(after) == 0);
                        after = id;
                    }
                }

                log("Random access");
                for (int j = 0; j < 50; j++) {
                    after = new NodeId();
                    log(" bigger than: " + after);
                    for (NodeId id : apm.getAllNodeIds(after, 2)) {
                        log("    " + id);
                        assertFalse(id.compareTo(after) == 0);
                        after = id;
                    }
                }
View Full Code Here


                PersistenceManager pm = (PersistenceManager) m.invoke(info, new Object[0]);
                if (!(pm instanceof AbstractBundlePersistenceManager)) {
                    log("PM skipped: " + pm.getClass());
                    continue;
                }
                AbstractBundlePersistenceManager apm = (AbstractBundlePersistenceManager) pm;
                log("PM: " + pm.getClass().getName());

                log("All nodes in one step");
                NodeId after = null;
                NodeId first = null;
                for (NodeId id : apm.getAllNodeIds(null, 0)) {
                    log("  " + id);
                    if (first == null) {
                        // initialize first node id
                        first = id;
                    }
                    if (after != null) {
                        assertFalse(id.compareTo(after) == 0);
                    }
                    after = id;
                }

                // start with first
                after = first;
                log("All nodes using batches");
                while (true) {
                    log(" bigger than: " + after);
                    Iterator<NodeId> it = apm.getAllNodeIds(after, 2).iterator();
                    if (!it.hasNext()) {
                        break;
                    }
                    while (it.hasNext()) {
                        NodeId id = it.next();
                        log("    " + id);
                        assertFalse(id.compareTo(after) == 0);
                        after = id;
                    }
                }

                log("Random access");
                for (int j = 0; j < 50; j++) {
                    after = new NodeId();
                    log(" bigger than: " + after);
                    for (NodeId id : apm.getAllNodeIds(after, 2)) {
                        log("    " + id);
                        assertFalse(id.compareTo(after) == 0);
                        after = id;
                    }
                }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.persistence.pool.AbstractBundlePersistenceManager

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.