code: private List<Entry> getPendingWrites() {
      synchronized (this) {
        List<Entry> save = this.pendingWrites;
        this.pendingWrites = new LinkedList<>();
        return save;
      }
    }
docs: will accumulate in a new list.