Esempio n. 1
0
 @Override
 public void close() {
   if (recordChanges.size() <= 32) {
     recordChanges.clear();
   } else {
     // Let's not allow the internal maps to grow too big over time.
     recordChanges = new HashMap<>();
   }
   changeCounter.clear();
 }
Esempio n. 2
0
    private RECORD prepareForChange() {
      ensureHasBeforeRecordImage();
      if (!this.changed) {
        RecordProxy<KEY, RECORD, ADDITIONAL> previous = this.allChanges.put(key, this);

        if (previous == null || !previous.isChanged()) {
          changeCounter.increment();
        }

        this.changed = true;
      }
      return this.record;
    }
Esempio n. 3
0
 @Override
 public int changeSize() {
   return changeCounter.value();
 }