Package jdbm

Examples of jdbm.RecordManager.commit()


     
    RecordManager recman = newRecordManager();
    PrimaryTreeMap<Long,String> t =  recman.treeMap("test",ser);
    t.put(1l, "hopsa hejsa1");
    t.put(2l, "hopsa hejsa2");
    recman.commit();
    assertEquals(t.get(2l),"hopsa hejsa2");
    assertTrue(i.intValue()>0);
    }
}
View Full Code Here


   
    byte[] data = UtilTT.makeRecord(1000000, (byte) 12);
    final long id = recman.insert(data);   
    data = (byte[]) recman.fetch(id);
    UtilTT.checkRecord(data, 1000000, (byte) 12);
    recman.commit();

    data = UtilTT.makeRecord(2000000, (byte) 13);
    recman.update(id, data);
    recman.commit();
    data = (byte[]) recman.fetch(id);
View Full Code Here

    UtilTT.checkRecord(data, 1000000, (byte) 12);
    recman.commit();

    data = UtilTT.makeRecord(2000000, (byte) 13);
    recman.update(id, data);
    recman.commit();
    data = (byte[]) recman.fetch(id);
    UtilTT.checkRecord(data, 2000000, (byte) 13);
    recman.commit();

    data = UtilTT.makeRecord(1500000, (byte) 14);
View Full Code Here

    data = UtilTT.makeRecord(2000000, (byte) 13);
    recman.update(id, data);
    recman.commit();
    data = (byte[]) recman.fetch(id);
    UtilTT.checkRecord(data, 2000000, (byte) 13);
    recman.commit();

    data = UtilTT.makeRecord(1500000, (byte) 14);
    recman.update(id, data);   
    data = (byte[]) recman.fetch(id);
    UtilTT.checkRecord(data, 1500000, (byte) 14);
View Full Code Here

    data = UtilTT.makeRecord(1500000, (byte) 14);
    recman.update(id, data);   
    data = (byte[]) recman.fetch(id);
    UtilTT.checkRecord(data, 1500000, (byte) 14);
    recman.commit();
   
    data = UtilTT.makeRecord(2500000, (byte) 15);
    recman.update(id, data)
    recman.rollback();
    data = (byte[]) recman.fetch(id);
View Full Code Here

    data = UtilTT.makeRecord(2500000, (byte) 15);
    recman.update(id, data)
    recman.rollback();
    data = (byte[]) recman.fetch(id);
    UtilTT.checkRecord(data, 1500000, (byte) 14);
    recman.commit();

    data = UtilTT.makeRecord(1, (byte) 20);
    recman.update(id, data);   
    data = (byte[]) recman.fetch(id);
    UtilTT.checkRecord(data, 1, (byte) 20);
View Full Code Here

    data = UtilTT.makeRecord(1, (byte) 20);
    recman.update(id, data);   
    data = (byte[]) recman.fetch(id);
    UtilTT.checkRecord(data, 1, (byte) 20);
    recman.commit();
       
   
  }
 
}
View Full Code Here

                recman.insert(UtilTT.makeRecord(rnd.nextInt(MAXSIZE),
                        (byte) rnd.nextInt()));
                inserts++;
               
                if ((inserts % 1000) == 0) {
                  recman.commit();
                    stop = System.currentTimeMillis();
                    if (stop - start >= DURATION)
                        break;

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