com.caucho.server.distcache
Class CacheLoaderAdapter<K,V>
java.lang.Object
com.caucho.server.distcache.CacheLoaderAdapter<K,V>
- All Implemented Interfaces:
- CacheLoaderExt<K,V>, CacheLoader<K,V>
public class CacheLoaderAdapter<K,V>
- extends java.lang.Object
- implements CacheLoaderExt<K,V>
Extended cache loader
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CacheLoaderAdapter
public CacheLoaderAdapter(CacheLoader<K,V> loader)
load
public void load(DistCacheEntry entry,
CacheLoaderCallback cb)
- Specified by:
load
in interface CacheLoaderExt<K,V>
load
public Cache.Entry<K,V> load(java.lang.Object key)
- Description copied from interface:
CacheLoader
- Obtains the value associated with the key, which will be loaded into the Cache
- Specified by:
load
in interface CacheLoader<K,V>
- Parameters:
key
- associated with the value.
- Returns:
- the value returned from the CacheLoader
loadAll
public java.util.Map<K,V> loadAll(java.lang.Iterable<? extends K> keys)
- Description copied from interface:
CacheLoader
- Creates a set of entries that will be loaded into the cache.
- Specified by:
loadAll
in interface CacheLoader<K,V>
- Parameters:
keys
- the collection of keys
- Returns:
- a map of key-value pairs that will be loaded into the cache.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object