Package io.kcache.caffeine
Class CaffeineCache<K,V>
- java.lang.Object
-
- com.google.common.collect.ForwardingObject
-
- com.google.common.collect.ForwardingMap<K,V>
-
- com.google.common.collect.ForwardingSortedMap<K,V>
-
- io.kcache.utils.InMemoryCache<K,V>
-
- io.kcache.caffeine.CaffeineCache<K,V>
-
- All Implemented Interfaces:
Cache<K,V>,Closeable,AutoCloseable,Map<K,V>,SortedMap<K,V>,org.apache.kafka.common.Configurable
public class CaffeineCache<K,V> extends InMemoryCache<K,V>
An in-memory cache with bounded size.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.collect.ForwardingSortedMap
com.google.common.collect.ForwardingSortedMap.StandardKeySet
-
-
Constructor Summary
Constructors Constructor Description CaffeineCache(Integer maximumSize, Duration expireAfterWrite, CacheLoader<K,V> loader)CaffeineCache(Integer maximumSize, Duration expireAfterWrite, CacheLoader<K,V> loader, Comparator<? super K> comparator)CaffeineCache(Comparator<? super K> comparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(Object key)Vget(Object key)Vput(K key, V value)voidputAll(Map<? extends K,? extends V> entries)Vremove(Object key)-
Methods inherited from class io.kcache.utils.InMemoryCache
all, close, delegate, descendingCache, destroy, flush, init, range, reset, subCache, sync
-
Methods inherited from class com.google.common.collect.ForwardingSortedMap
comparator, firstKey, headMap, lastKey, standardContainsKey, standardSubMap, subMap, tailMap
-
Methods inherited from class com.google.common.collect.ForwardingMap
containsValue, entrySet, equals, hashCode, isEmpty, keySet, size, standardClear, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString, values
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsValue, equals, forEach, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove, replace, replace, replaceAll, size
-
-
-
-
Constructor Detail
-
CaffeineCache
public CaffeineCache(Comparator<? super K> comparator)
-
CaffeineCache
public CaffeineCache(Integer maximumSize, Duration expireAfterWrite, CacheLoader<K,V> loader)
-
CaffeineCache
public CaffeineCache(Integer maximumSize, Duration expireAfterWrite, CacheLoader<K,V> loader, Comparator<? super K> comparator)
-
-