Class CaffeinatedGuavaLoadingCache.BulkLoader<K,V>
java.lang.Object
com.github.benmanes.caffeine.guava.CaffeinatedGuavaLoadingCache.SingleLoader<K,V>
com.github.benmanes.caffeine.guava.CaffeinatedGuavaLoadingCache.BulkLoader<K,V>
- All Implemented Interfaces:
AsyncCacheLoader<K,V>, CacheLoader<K, V>, Serializable
- Enclosing class:
CaffeinatedGuavaLoadingCache<K,V>
static final class CaffeinatedGuavaLoadingCache.BulkLoader<K,V>
extends CaffeinatedGuavaLoadingCache.SingleLoader<K,V>
-
Field Summary
FieldsFields inherited from class CaffeinatedGuavaLoadingCache.SingleLoader
cacheLoader -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class CaffeinatedGuavaLoadingCache.SingleLoader
load, reloadMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CacheLoader
asyncLoad, asyncLoadAll, asyncReload
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
BulkLoader
-
-
Method Details
-
loadAll
Description copied from interface:CacheLoaderComputes or retrieves the values corresponding tokeys. This method is called byLoadingCache.getAll(Iterable).If the returned map doesn't contain all requested
keysthen the entries it does contain will be cached andgetAllwill return the partial results. If the returned map contains extra keys not present inkeysthen all returned entries will be cached, but only the entries forkeyswill be returned fromgetAll.This method should be overridden when bulk retrieval is significantly more efficient than many individual lookups. Note that
LoadingCache.getAll(Iterable)will defer to individual calls toLoadingCache.get(K)if this method is not overridden.Warning: loading must not attempt to update any mappings of this cache directly.
- Parameters:
keys- the unique, non-null keys whose values should be loaded- Returns:
- a map from each key in
keysto the value associated with that key; may not contain null values
-