@Override
    protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
      return this.size() > maxSize;
    }
Provides a thread local cache with a maximum cache size per thread.

<p>Note: Values must not be null.

<p>Copied from flink-1.18
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/util/ThreadLocalCache.java