private void reportCached(TagState state, long size) {
    synchronized (state) {
      ++state.bufferCount;
      state.totalSize += size;
      state.maxSize = Math.max(state.maxSize, state.totalSize);
      state.maxCount = Math.max(state.maxCount, state.bufferCount);
    }
  }
A wrapper around cache eviction policy that tracks cache contents via tags.
llap-server/src/java/org/apache/hadoop/hive/llap/cache/CacheContentsTracker.java