com.caucho.server.distcache
Class AbstractCacheBacking<K,V>
java.lang.Object
com.caucho.server.distcache.AbstractCacheBacking<K,V>
- All Implemented Interfaces:
- CacheBacking<K,V>, CacheLoaderExt<K,V>, CacheWriterExt<K,V>, CacheLoader<K,V>, CacheWriter<K,V>
- Direct Known Subclasses:
- JdbcCacheBacking
public class AbstractCacheBacking<K,V>
- extends java.lang.Object
- implements CacheBacking<K,V>
Extended cache loader
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractCacheBacking
public AbstractCacheBacking()
load
public void load(DistCacheEntry entry,
CacheLoaderCallback cb)
- Specified by:
load
in interface CacheLoaderExt<K,V>
write
public void write(DistCacheEntry entry)
- Specified by:
write
in interface CacheWriterExt<K,V>
delete
public void delete(DistCacheEntry entry)
- Specified by:
delete
in interface CacheWriterExt<K,V>
updateTime
public void updateTime(DistCacheEntry distCacheEntry)
- Specified by:
updateTime
in interface CacheWriterExt<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.
write
public void write(Cache.Entry<K,V> entry)
- Specified by:
write
in interface CacheWriter<K,V>
writeAll
public void writeAll(java.util.Collection<Cache.Entry<? extends K,? extends V>> entries)
- Specified by:
writeAll
in interface CacheWriter<K,V>
delete
public void delete(java.lang.Object key)
- Specified by:
delete
in interface CacheWriter<K,V>
deleteAll
public void deleteAll(java.util.Collection<?> entries)
- Specified by:
deleteAll
in interface CacheWriter<K,V>