test_class.declarator: e = new SnapshotEngine(new StorageDirect(Volume.memoryFactory(false)))
test_class.original_string: SnapshotEngine e = new SnapshotEngine(new StorageDirect(Volume.memoryFactory(false)));
test_class.type: SnapshotEngine
test_class.var_name: e
test_class.file: migration/third-party/org.mapdb/src/test/java/org/mapdb/SnapshotEngineTest.java
test_class.identifier: SnapshotEngineTest
test_case.body: @Test public void update(){
          long recid = e.put(111, Serializer.INTEGER_SERIALIZER);
          Engine snapshot = e.snapshot();
          e.update(recid, 222, Serializer.INTEGER_SERIALIZER);
          assertEquals(Integer.valueOf(111), snapshot.get(recid, Serializer.INTEGER_SERIALIZER));
      }
test_case.class_method_signature: SnapshotEngineTest.update()
test_case.full_signature: @Test public void update()
test_case.identifier: update
test_case.invocations: put snapshot update assertEquals valueOf get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void update()
focal_class.declarator: locks = new Locks.LongHashMapRecidLocks()
focal_class.modifier: protected final
focal_class.original_string: protected final Locks.RecidLocks locks = new Locks.LongHashMapRecidLocks();
focal_class.type: Locks.RecidLocks
focal_class.var_name: locks
focal_class.declarator: NOT_EXIST = new Object()
focal_class.modifier: protected final static
focal_class.original_string: protected final static Object NOT_EXIST = new Object();
focal_class.type: Object
focal_class.var_name: NOT_EXIST
focal_class.declarator: NOT_INIT_YET = new Object()
focal_class.modifier: protected final static
focal_class.original_string: protected final static Object NOT_INIT_YET = new Object();
focal_class.type: Object
focal_class.var_name: NOT_INIT_YET
focal_class.declarator: snapshots = new ConcurrentHashMap<Snapshot, String>()
focal_class.modifier: protected final
focal_class.original_string: protected final Map<Snapshot, String> snapshots = new ConcurrentHashMap<Snapshot, String>();
focal_class.type: Map<Snapshot, String>
focal_class.var_name: snapshots
focal_class.declarator: snapshotsLock = new ReentrantReadWriteLock()
focal_class.modifier: protected final
focal_class.original_string: protected final ReentrantReadWriteLock snapshotsLock = new ReentrantReadWriteLock();
focal_class.type: ReentrantReadWriteLock
focal_class.var_name: snapshotsLock
focal_class.file: migration/third-party/org.mapdb/src/main/java/org/mapdb/SnapshotEngine.java
focal_class.identifier: SnapshotEngine
focal_class.class_method_signature: SnapshotEngine.SnapshotEngine(Engine engine)
focal_class.full_signature: protected  SnapshotEngine(Engine engine)
focal_class.identifier: SnapshotEngine
focal_class.modifiers: protected
focal_class.parameters: (Engine engine)
focal_class.signature:  SnapshotEngine(Engine engine)
focal_class.class_method_signature: SnapshotEngine.snapshot()
focal_class.full_signature: public Engine snapshot()
focal_class.identifier: snapshot
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Engine
focal_class.signature: Engine snapshot()
focal_class.class_method_signature: SnapshotEngine.put(A value, Serializer<A> serializer)
focal_class.full_signature: @Override public long put(A value, Serializer<A> serializer)
focal_class.identifier: put
focal_class.modifiers: @Override public
focal_class.parameters: (A value, Serializer<A> serializer)
focal_class.return: long
focal_class.signature: long put(A value, Serializer<A> serializer)
focal_class.class_method_signature: SnapshotEngine.compareAndSwap(long recid, A expectedOldValue, A newValue, Serializer<A> serializer)
focal_class.full_signature: @Override public boolean compareAndSwap(long recid, A expectedOldValue, A newValue, Serializer<A> serializer)
focal_class.identifier: compareAndSwap
focal_class.modifiers: @Override public
focal_class.parameters: (long recid, A expectedOldValue, A newValue, Serializer<A> serializer)
focal_class.return: boolean
focal_class.signature: boolean compareAndSwap(long recid, A expectedOldValue, A newValue, Serializer<A> serializer)
focal_class.class_method_signature: SnapshotEngine.update(long recid, A value, Serializer<A> serializer)
focal_class.full_signature: @Override public void update(long recid, A value, Serializer<A> serializer)
focal_class.identifier: update
focal_class.modifiers: @Override public
focal_class.parameters: (long recid, A value, Serializer<A> serializer)
focal_class.return: void
focal_class.signature: void update(long recid, A value, Serializer<A> serializer)
focal_class.class_method_signature: SnapshotEngine.delete(long recid, Serializer<A> serializer)
focal_class.full_signature: @Override public void delete(long recid, Serializer<A> serializer)
focal_class.identifier: delete
focal_class.modifiers: @Override public
focal_class.parameters: (long recid, Serializer<A> serializer)
focal_class.return: void
focal_class.signature: void delete(long recid, Serializer<A> serializer)
focal_class.class_method_signature: SnapshotEngine.createSnapshotFor(Engine engine)
focal_class.full_signature: public static Engine createSnapshotFor(Engine engine)
focal_class.identifier: createSnapshotFor
focal_class.modifiers: public static
focal_class.parameters: (Engine engine)
focal_class.return: Engine
focal_class.signature: Engine createSnapshotFor(Engine engine)
focal_class.superclass: extends EngineWrapper
focal_method.body: @Override
      public <A> void update(long recid, A value, Serializer<A> serializer) {
          locks.lock(recid);
          try{
              Object val = NOT_INIT_YET;
              for(Snapshot s:snapshots.keySet()){
                  if(s.oldValues.get(recid)==null){
                      if(val == NOT_INIT_YET)
                          val = get(recid, serializer);
                      s.oldValues.put(recid,val);
                  }
              }
  
              super.update(recid, value, serializer);
          }finally{
              locks.unlock(recid);
          }
      }
focal_method.class_method_signature: SnapshotEngine.update(long recid, A value, Serializer<A> serializer)
focal_method.full_signature: @Override public void update(long recid, A value, Serializer<A> serializer)
focal_method.identifier: update
focal_method.invocations: lock keySet get get put update unlock
focal_method.modifiers: @Override public
focal_method.parameters: (long recid, A value, Serializer<A> serializer)
focal_method.return: void
focal_method.signature: void update(long recid, A value, Serializer<A> serializer)