Class ThreadLocalCache<K,V>

java.lang.Object
org.apache.flink.table.utils.ThreadLocalCache<K,V>

@Internal public abstract class ThreadLocalCache<K,V> extends Object
Provides a thread local cache with a maximum cache size per thread.

Note: Values must not be null.

  • Constructor Details

    • ThreadLocalCache

      protected ThreadLocalCache()
    • ThreadLocalCache

      protected ThreadLocalCache(int maxSizePerThread)
  • Method Details

    • get

      public V get(K key)
    • getNewInstance

      public abstract V getNewInstance(K key)
    • of

      public static <K, V> ThreadLocalCache<K,V> of(Function<K,V> creator)