Пример #1
0
 @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));
 }
Пример #2
0
 @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));
 }
Пример #3
0
 @Test
 public void notExist() {
   Engine snapshot = e.snapshot();
   long recid = e.put(111, SerializerBase.INTEGER);
   assertNull(snapshot.get(recid, SerializerBase.INTEGER));
 }