javax.cache
Interface CacheLoader<K,V>


public interface CacheLoader<K,V>


Method Summary
 Cache.Entry<K,V> load(java.lang.Object key)
          Obtains the value associated with the key, which will be loaded into the Cache
 java.util.Map<K,V> loadAll(java.lang.Iterable<? extends K> keys)
          Creates a set of entries that will be loaded into the cache.
 

Method Detail

load

Cache.Entry<K,V> load(java.lang.Object key)
Obtains the value associated with the key, which will be loaded into the Cache

Parameters:
key - associated with the value.
Returns:
the value returned from the CacheLoader
Throws:
CacheException

loadAll

java.util.Map<K,V> loadAll(java.lang.Iterable<? extends K> keys)
Creates a set of entries that will be loaded into the cache.

Parameters:
keys - the collection of keys
Returns:
a map of key-value pairs that will be loaded into the cache.
Throws:
CacheException