Package io.airlift.concurrent
Class ThreadLocalCache<K,V>
- java.lang.Object
-
- io.airlift.concurrent.ThreadLocalCache<K,V>
-
- Type Parameters:
K- cache key typeV- cache value type
public final class ThreadLocalCache<K,V> extends Object
Provides a ThreadLocal cache with a maximum cache size per thread. Values must not be null.
-
-
Constructor Summary
Constructors Constructor Description ThreadLocalCache(int maxSizePerThread, Function<K,V> loader)
-