Package org.helidb.txn

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


        assertEquals("value 2", db.get("key 2"));
        assertEquals("value 1", db.get("key 1"));
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here


        txn.commit();

        txn = Transaction.startTransaction(false);
        db.update("key 1", "value 1p");
        db.update("key 2", "value 2p");
        txn.rollback();

        txn = Transaction.startTransaction(true);
        assertEquals(2, db.size());
        assertEquals("value 2", db.get("key 2"));
        assertEquals("value 1", db.get("key 1"));
View Full Code Here

        assertEquals("value 2", db.get("key 2"));
        assertEquals("value 1", db.get("key 1"));
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

        txn.commit();

        txn = Transaction.startTransaction(false);
        db.update("key 1", "value 1p");
        db.update("key 2", "value 2p");
        txn.rollback();

        txn = Transaction.startTransaction(true);
        assertEquals(2, db.size());
        assertEquals("value 2", db.get("key 2"));
        assertEquals("value 1", db.get("key 1"));
View Full Code Here

        assertEquals("value 2", db.get("key 2"));
        assertEquals("value 1", db.get("key 1"));
      }
      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("key 1", "value 1p");
        txn.rollback();

        txn = Transaction.startTransaction(true);
        assertEquals(2, db.size());
        assertEquals("value 2", db.get("key 2"));
        assertEquals("value 1", db.get("key 1"));
View Full Code Here

        assertEquals("value 2", db.get("key 2"));
        assertEquals("value 1", db.get("key 1"));
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

        assertEquals("value 3", db.get("key 3"));
        assertEquals("value 2", db.get("key 2"));
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

        db.insert("key 3", "value 3");
        txn.commit();

        txn = Transaction.startTransaction(false);
        db.compact();
        txn.rollback();

        txn = Transaction.startTransaction(true);
        assertEquals(2, db.size());
        assertEquals("value 3", db.get("key 3"));
        assertEquals("value 2", db.get("key 2"));
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.