@Test public void commit_conflict(){ DB db0 = tx.makeTx(); long recid = db0.getEngine().put(111, Serializer.INTEGER_SERIALIZER); db0.commit(); DB db1 = tx.makeTx(); db1.getEngine().update(recid, 222, Serializer.INTEGER_SERIALIZER); try{ tx.makeTx().getEngine().update(recid, 333, Serializer.INTEGER_SERIALIZER); fail("should throw exception"); }catch(TxRollbackException e){ } db1.commit(); assertEquals(Integer.valueOf(222), tx.makeTx().getEngine().get(recid, Serializer.INTEGER_SERIALIZER)); }
public DB makeTx(){ return new DB(new TxEngine(engine)); }
TxMaker { public DB makeTx(){ return new DB(new TxEngine(engine)); } }
TxMaker { public DB makeTx(){ return new DB(new TxEngine(engine)); } TxMaker(Engine engine); }
TxMaker { public DB makeTx(){ return new DB(new TxEngine(engine)); } TxMaker(Engine engine); DB makeTx(); void close(); void execute(TxBlock txBlock); }
TxMaker { public DB makeTx(){ return new DB(new TxEngine(engine)); } TxMaker(Engine engine); DB makeTx(); void close(); void execute(TxBlock txBlock);  }