Package jdbm

Examples of jdbm.RecordManager.update()


        assertTrue("check data3",
               UtilTT.checkRecord((byte[]) recman.fetch(rowid), 10000, (byte) 3) );

        // .. and again
        data = UtilTT.makeRecord(30000, (byte) 4);
        recman.update(rowid, data);
        assertTrue("check data3",
               UtilTT.checkRecord((byte[]) recman.fetch(rowid), 30000, (byte) 4) );

        // close the file
        recman.close();
View Full Code Here


     
      Object obj = recman.fetch(6666666);
      assertTrue(obj == null);
     
      try{
        recman.update(6666666, obj);
        recman.commit();
        fail();
      }catch(IOException expected){

      }
View Full Code Here

    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);
    UtilTT.checkRecord(data, 2000000, (byte) 13);
    recman.commit();
View Full Code Here

    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);
    recman.commit();
   
    data = UtilTT.makeRecord(2500000, (byte) 15);
View Full Code Here

    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);
    UtilTT.checkRecord(data, 1500000, (byte) 14);
    recman.commit();
View Full Code Here

    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);
    recman.commit();
       
   
View Full Code Here

        try {

            long stop = 0;
            while (true) {

                recman.update(rowids[rnd.nextInt(RECORDS)],
                           UtilTT.makeRecord(rnd.nextInt(MAXSIZE),
                                   (byte) rnd.nextInt()));
                updates++;
                if ((updates % 25) == 0) {
                    stop = System.currentTimeMillis();
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.