Package org.helidb.txn

Examples of org.helidb.txn.Transaction.rollback()


        txn.commit();

        txn = Transaction.startTransaction(false);
        db.insert(3, 30L);
        db.insert(4, 40L);
        txn.rollback();

        txn = Transaction.startTransaction(true);
        assertEquals(2, db.size());
        assertEquals(20L, db.get(2).longValue());
        assertEquals(10L, db.get(1).longValue());
View Full Code Here


        assertEquals(20L, db.get(2).longValue());
        assertEquals(10L, db.get(1).longValue());
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

        txn.commit();

        txn = Transaction.startTransaction(false);
        db.update(1, 100L);
        db.update(2, 200L);
        txn.rollback();

        txn = Transaction.startTransaction(true);
        assertEquals(2, db.size());
        assertEquals(20L, db.get(2).longValue());
        assertEquals(10L, db.get(1).longValue());
View Full Code Here

        assertEquals(20L, db.get(2).longValue());
        assertEquals(10L, db.get(1).longValue());
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

        txn.commit();

        txn = Transaction.startTransaction(false);
        db.update(1, 100L);
        db.update(2, 200L);
        txn.rollback();

        txn = Transaction.startTransaction(true);
        assertEquals(2, db.size());
        assertEquals(20L, db.get(2).longValue());
        assertEquals(10L, db.get(1).longValue());
View Full Code Here

        assertEquals(20L, db.get(2).longValue());
        assertEquals(10L, db.get(1).longValue());
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

        txn = Transaction.startTransaction(true);
        assertEquals(0, db.size());
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

        txn.commit();

        txn = Transaction.startTransaction(false);
        db.clear();
        db.insert(1, 100L);
        txn.rollback();

        txn = Transaction.startTransaction(true);
        assertEquals(2, db.size());
        assertEquals(20L, db.get(2).longValue());
        assertEquals(10L, db.get(1).longValue());
View Full Code Here

        assertEquals(20L, db.get(2).longValue());
        assertEquals(10L, db.get(1).longValue());
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

        assertEquals(30L, db.get(3).longValue());
        assertEquals(20L, db.get(2).longValue());
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
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.