Examples of ORecordIteratorClass


Examples of com.orientechnologies.orient.core.iterator.ORecordIteratorClass

    for (int i = 0; i < 1000000; i++) {
      ODocument document = new ODocument("SpeedTest");
      document.save();
    }

    ORecordIteratorClass iterator = new ORecordIteratorClass(db, (ODatabaseRecordAbstract) db.getUnderlying(), "SpeedTest", true);
    iterator.setRange(new ORecordId(oClass.getDefaultClusterId(), new OClusterPositionLong(999998)),
        new ORecordId(oClass.getDefaultClusterId(), new OClusterPositionLong(999999)));

    long start = System.nanoTime();

    while (iterator.hasNext())
      iterator.next();

    long end = System.nanoTime();
    System.out.println(end - start);

    db.drop();
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.