| javax.cache.spi.CacheLoader
All known Subclasses: ri.cache.transport.RemoteCacheLoader, junit.support.FailingCacheLoader, junit.support.EventRecordingMemoryCacheLoader,
CacheLoader | public interface CacheLoader (Code) | | A CacheLoader is used by a cache to request missing data on a cache miss,
or to pre-load specific data into the cache. The CacheLoader is considered
to be part of the application, and not part of the cache implementation
itself, and as such is considered a form of call-back interface.
author: cp 2003.05.29 |
Method Summary | |
public void | censorPut(K key, V value) | public V | load(K oKey) Return the value associated with the specified key, or null if the
key does not have an associated value in the underlying store. | public Map<K, V> | loadAll(Collection<? extends K> colKeys) Return the values associated with each the specified keys in the
passed collection. |
load | public V load(K oKey) throws CacheLoaderException(Code) | | Return the value associated with the specified key, or null if the
key does not have an associated value in the underlying store.
Parameters: oKey - key whose associated value is to be returned the value associated with the specified key, ornull if no value is available for that key throws: CacheLoaderException - the CacheLoader wrap an exception thatoccurs when loading data, such as an exception from the datasource, as a CacheLoaderException to report the failure backto the calling cache |
loadAll | public Map<K, V> loadAll(Collection<? extends K> colKeys) throws CacheLoaderException(Code) | | 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.
Parameters: colKeys - a collection of keys to load a Map of keys to associated values for the specified keys throws: CacheLoaderException - the CacheLoader wrap an exception thatoccurs when loading data, such as an exception from the datasource, as a CacheLoaderException to report the failure backto the calling cache |
|
|