Package org.helidb.txn

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


        assertEquals("value1", db.get("key1"));
        assertEquals("value10", db.get("key10"));
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here


        assertEquals("value1", db.get("key1"));
        assertEquals("value10", db.get("key10"));
      }
      finally
      {
        txn.rollback();
      }

      txn = Transaction.startTransaction(true);
      try
      {
View Full Code Here

        assertNull(db.get("key1"));
        assertNull(db.get("key10"));
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

      {
        assertEquals("value1", db.get("key1"));
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

      {
        assertNull(db.get("key11"));
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

      }
      finally
      {
        if (!committed)
        {
          txn.rollback();
        }
      }
    }
    finally
    {
View Full Code Here

        tearDownDatabase(db);
        destroyed = true;
        committed = true;
        try
        {
          txn.rollback();
        }
        catch (IllegalStateException e)
        {
          // ok
        }
View Full Code Here

      }
      finally
      {
        if (!committed)
        {
          txn.rollback();
        }
      }
    }
    finally
    {
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.insert("key 3", "value 3");
        db.insert("key 4", "value 4");
        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

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.