Package com.tangosol.net.cache
Interface CacheLoader<K,V>
-
- All Known Subinterfaces:
CacheStore<K,V>
,IterableCacheLoader<K,V>
- All Known Implementing Classes:
AbstractCacheLoader
,AbstractCacheStore
,BinaryStoreCacheStore
,CacheLoaderCacheStore
,CacheLoaderCacheStore.Iterable
,MapCacheStore
,NullImplementation.NullCacheStore
,ReadWriteBackingMap.CacheLoaderCacheStore
public interface CacheLoader<K,V>
A JCache CacheLoader.- Since:
- Coherence 2.2
- Author:
- cp 2003.05.29
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description V
load(K key)
Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.default Map<K,V>
loadAll(Collection<? extends K> colKeys)
Return the values associated with each the specified keys in the passed collection.
-
-
-
Method Detail
-
load
V load(K key)
Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.- Parameters:
key
- key whose associated value is to be returned- Returns:
- the value associated with the specified key, or null if no value is available for that key
-
loadAll
default Map<K,V> loadAll(Collection<? extends K> colKeys)
Return the values associated with each the specified keys in the passed collection. If a key does not have an associated value in the underlying store, then the return map will not have an entry for that key.The default implementation of this method calls
load(K)
for each key in the supplied Collection. Implementations that can optimize multi-key operationsshould
override this default implementation.- Parameters:
colKeys
- a collection of keys to load- Returns:
- a Map of keys to associated values for the specified keys
-
-