@Test public void delete() { long recid = e.put(111, SerializerBase.INTEGER); e.commit(); Engine snapshot = e.snapshot(); e.delete(recid, SerializerBase.INTEGER); assertEquals(Integer.valueOf(111), snapshot.get(recid, SerializerBase.INTEGER)); }
@Test public void compareAndSwap() { long recid = e.put(111, SerializerBase.INTEGER); e.commit(); Engine snapshot = e.snapshot(); e.compareAndSwap(recid, 111, 222, SerializerBase.INTEGER); assertEquals(Integer.valueOf(111), snapshot.get(recid, SerializerBase.INTEGER)); }
@Test public void notExist() { Engine snapshot = e.snapshot(); long recid = e.put(111, SerializerBase.INTEGER); assertNull(snapshot.get(recid, SerializerBase.INTEGER)); }