com.caucho.server.distcache
Class AbstractCacheBacking<K,V>

java.lang.Object
  extended by 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


Constructor Summary
AbstractCacheBacking()
           
 
Method Summary
 void delete(DistCacheEntry entry)
           
 void delete(java.lang.Object key)
           
 void deleteAll(java.util.Collection<?> entries)
           
 void load(DistCacheEntry entry, CacheLoaderCallback cb)
           
 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.
 void updateTime(DistCacheEntry distCacheEntry)
           
 void write(Cache.Entry<K,V> entry)
           
 void write(DistCacheEntry entry)
           
 void writeAll(java.util.Collection<Cache.Entry<? extends K,? extends V>> entries)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCacheBacking

public AbstractCacheBacking()
Method Detail

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>