Package org.apache.jackrabbit.core

Examples of org.apache.jackrabbit.core.NodeIdIterator


        return persistenceManagerScan;
    }

    private void scanPersistenceManagers() throws ItemStateException, RepositoryException {
        for (IterablePersistenceManager pm : pmList) {
            NodeIdIterator it = pm.getAllNodeIds(null, 0);
            while (it.hasNext()) {
                NodeId id = it.nextNodeId();
                if (callback != null) {
                    callback.beforeScanning(null);
                }
                try {
                    NodeState state = pm.load(id);
View Full Code Here


                }
                AbstractBundlePersistenceManager apm = (AbstractBundlePersistenceManager) pm;
                log("PM: " + pm.getClass().getName());

                log("All nodes in one step");
                NodeIdIterator it = apm.getAllNodeIds(null, 0);
                NodeId after = null;
                NodeId first = null;
                while (it.hasNext()) {
                    NodeId id = it.nextNodeId();
                    log("  " + id.toString());
                    if (first == null) {
                        // initialize first node id
                        first = id;
                    }
                    if (after != null) {
                        assertFalse(id.getUUID().compareTo(after.getUUID()) == 0);
                    }
                    after = id;
                }

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

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

        return persistenceManagerScan;
    }

    private void scanPersistenceManagers() throws ItemStateException, RepositoryException {
        for (IterablePersistenceManager pm : pmList) {
            NodeIdIterator it = pm.getAllNodeIds(null, 0);
            while (it.hasNext()) {
                NodeId id = it.nextNodeId();
                if (callback != null) {
                    callback.beforeScanning(null);
                }
                try {
                    NodeState state = pm.load(id);
View Full Code Here

            }
            AbstractBundlePersistenceManager apm = (AbstractBundlePersistenceManager) pm;
            log("PM: " + pm.getClass().getName());

            log("All nodes in one step");
            NodeIdIterator it = apm.getAllNodeIds(null, 0);
            NodeId after = null;
            while (it.hasNext()) {
                NodeId id = it.nextNodeId();
                log("  " + id.toString());
                if (after != null) {
                    assertFalse(id.getUUID().compareTo(after.getUUID()) == 0);
                }
                after = id;
            }

            log("All nodes using batches");
            while (true) {
                log(" bigger than: " + after);
                it = apm.getAllNodeIds(after, 2);
                if (!it.hasNext()) {
                    break;
                }
                while (it.hasNext()) {
                    NodeId id = it.nextNodeId();
                    log("    " + id.toString());
                    assertFalse(id.getUUID().compareTo(after.getUUID()) == 0);
                    after = id;
                }
            }

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

            }
            AbstractBundlePersistenceManager apm = (AbstractBundlePersistenceManager) pm;
            log("PM: " + pm.getClass().getName());

            log("All nodes in one step");
            NodeIdIterator it = apm.getAllNodeIds(null, 0);
            NodeId after = null;
            NodeId first = null;
            while (it.hasNext()) {
                NodeId id = it.nextNodeId();
                log("  " + id.toString());
                if (first == null) {
                    // initialize first node id
                    first = id;
                }
                if (after != null) {
                    assertFalse(id.getUUID().compareTo(after.getUUID()) == 0);
                }
                after = id;
            }

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

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

                }
                AbstractBundlePersistenceManager apm = (AbstractBundlePersistenceManager) pm;
                log("PM: " + pm.getClass().getName());

                log("All nodes in one step");
                NodeIdIterator it = apm.getAllNodeIds(null, 0);
                NodeId after = null;
                NodeId first = null;
                while (it.hasNext()) {
                    NodeId id = it.nextNodeId();
                    log("  " + id.toString());
                    if (first == null) {
                        // initialize first node id
                        first = id;
                    }
                    if (after != null) {
                        assertFalse(id.getUUID().compareTo(after.getUUID()) == 0);
                    }
                    after = id;
                }

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

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

TOP

Related Classes of org.apache.jackrabbit.core.NodeIdIterator

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.