Type Parameters:
K
-
V
-
All Implemented Interfaces:
com.github.benmanes.caffeine.cache.Cache<K,V>
public class NoopCache<K,V>
extends Object
implements com.github.benmanes.caffeine.cache.Cache<K,V>
A cache implementation that remains an empty collection and returns null when
trying to access records, only the get function
V get(K key, Function<? super K, ? extends V> mappingFunction)
will
execute the mapping function if it exists
Constructor Summary
Constructors
Method Summary
All Methods Instance Methods Concrete Methods
void
long
void
void
void
com.github.benmanes.caffeine.cache.Policy<K ,V >
void
void
com.github.benmanes.caffeine.cache.stats.CacheStats
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
Methods inherited from interface com.github.benmanes.caffeine.cache.Cache
getAll
Constructor Details
NoopCache
public NoopCache ()
Method Details
getIfPresent
Specified by:
getIfPresent
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >
get
public V get (K key,
Function <? super K ,? extends V > mappingFunction)
Specified by:
get
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >
getAllPresent
Specified by:
getAllPresent
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >
put
public void put (K key,
V value)
Specified by:
put
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >
putAll
public void putAll (Map <? extends K ,? extends V > map)
Specified by:
putAll
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >
invalidate
public void invalidate (Object key)
Specified by:
invalidate
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >
invalidateAll
public void invalidateAll (Iterable <?> keys)
Specified by:
invalidateAll
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >
invalidateAll
public void invalidateAll ()
Specified by:
invalidateAll
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >
estimatedSize
public long estimatedSize ()
Specified by:
estimatedSize
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >
stats
public com.github.benmanes.caffeine.cache.stats.CacheStats stats ()
Specified by:
stats
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >
asMap
Specified by:
asMap
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >
cleanUp
public void cleanUp ()
Specified by:
cleanUp
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >
policy
public com.github.benmanes.caffeine.cache.Policy<K ,V > policy ()
Specified by:
policy
in interface com.github.benmanes.caffeine.cache.Cache<K ,V >