Class CaffeinatedGuavaCache<K,V>
- java.lang.Object
-
- com.github.benmanes.caffeine.guava.CaffeinatedGuavaCache<K,V>
-
- All Implemented Interfaces:
com.google.common.cache.Cache<K,V>
,java.io.Serializable
- Direct Known Subclasses:
CaffeinatedGuavaLoadingCache
class CaffeinatedGuavaCache<K,V> extends java.lang.Object implements com.google.common.cache.Cache<K,V>, java.io.Serializable
A Caffeine-backed cache through a Guava facade.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
CaffeinatedGuavaCache.CacheLoaderException
-
Field Summary
Fields Modifier and Type Field Description (package private) Cache<K,V>
cache
(package private) static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description CaffeinatedGuavaCache(Cache<K,V> cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.ConcurrentMap<K,V>
asMap()
void
cleanUp()
V
get(K key, java.util.concurrent.Callable<? extends V> valueLoader)
com.google.common.collect.ImmutableMap<K,V>
getAllPresent(java.lang.Iterable<?> keys)
@Nullable V
getIfPresent(java.lang.Object key)
void
invalidate(java.lang.Object key)
void
invalidateAll()
void
invalidateAll(java.lang.Iterable<?> keys)
void
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> m)
long
size()
com.google.common.cache.CacheStats
stats()
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIfPresent
public @Nullable V getIfPresent(java.lang.Object key)
-
get
public V get(K key, java.util.concurrent.Callable<? extends V> valueLoader) throws java.util.concurrent.ExecutionException
-
getAllPresent
public com.google.common.collect.ImmutableMap<K,V> getAllPresent(java.lang.Iterable<?> keys)
-
invalidate
public void invalidate(java.lang.Object key)
-
invalidateAll
public void invalidateAll(java.lang.Iterable<?> keys)
-
invalidateAll
public void invalidateAll()
-
stats
public com.google.common.cache.CacheStats stats()
-
-