Package org.helidb.txn

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


        db.insert(3, 30L);
        txn.commit();

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

        txn = Transaction.startTransaction(true);
        assertEquals(2, db.size());
        assertEquals(30L, db.get(3).longValue());
        assertEquals(20L, db.get(2).longValue());
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

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

        db.insert(3, 30L);
        txn.commit();

        txn = Transaction.startTransaction(false);
        db.delete(2);
        txn.rollback();

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

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

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

        txn.commit();

        txn = Transaction.startTransaction(false);
        db.update(1, 1000L);
        db.update(1, 10000L);
        txn.rollback();

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

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

        db.fasterInsert(Integer.valueOf(12), Long.valueOf(345823L));
        db.close();
      }
      finally
      {
        txn.rollback();
      }
    }
    finally
    {
      tearDownDatabase(db);
View Full Code Here

              // Now the database is closed.
              assertFalse(((AtomicBoolean) mp.get("flag1")).get());
            }
            finally
            {
              txn.rollback();
            }
          }
          finally
          {
            if (l1 != null)
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.