|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ehcache.loaderwriter.writebehind.WriteBehindDecoratorLoaderWriter<K,V>
public class WriteBehindDecoratorLoaderWriter<K,V>
Constructor Summary | |
---|---|
WriteBehindDecoratorLoaderWriter(CacheLoaderWriter<K,V> loaderWriter,
WriteBehindConfiguration config)
|
Method Summary | |
---|---|
void |
delete(K key)
Deletes a single entry from the underlying system of record. |
void |
deleteAll(java.lang.Iterable<? extends K> keys)
Deletes a set of entry from the underlying system of record. |
AggregateWriteBehindQueue<K,V> |
getWriteBehindQueue()
|
V |
load(K key)
Loads the value to be associated with the given key in the Cache using this
CacheLoaderWriter instance. |
java.util.Map<K,V> |
loadAll(java.lang.Iterable<? extends K> keys)
Loads the values to be associated with the keys in the Cache using this
CacheLoaderWriter instance. |
void |
write(K key,
V value)
Writes a single entry to the underlying system of record, maybe a brand new value or an update to an existing value |
void |
writeAll(java.lang.Iterable<? extends java.util.Map.Entry<? extends K,? extends V>> entries)
Writes multiple entries to the underlying system of record. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WriteBehindDecoratorLoaderWriter(CacheLoaderWriter<K,V> loaderWriter, WriteBehindConfiguration config)
Method Detail |
---|
public AggregateWriteBehindQueue<K,V> getWriteBehindQueue()
public V load(K key) throws java.lang.Exception
CacheLoaderWriter
Cache
using this
CacheLoaderWriter
instance.
load
in interface CacheLoaderWriter<K,V>
key
- the key that will map to the value
returned
java.lang.Exception
- if the value cannot be loadedpublic java.util.Map<K,V> loadAll(java.lang.Iterable<? extends K> keys) throws java.lang.Exception
CacheLoaderWriter
Cache
using this
CacheLoaderWriter
instance. The returned Map
should contain
null
mapped keys for values that couldn't be found.
key
as found in the input parameter keys
mapped to the result of loadAllResult.get(key)
. Any other mapping will be ignored.
loadAll
in interface CacheLoaderWriter<K,V>
keys
- the keys that will be mapped to the values returned in the map
Map
of values for each key passed in, where no mapping means no value to map.
BulkCacheLoadingException
- This writer must throw this exception to indicate partial
success. The exception declares which keys were actually loaded (if any)
java.lang.Exception
- a generic failure. All values will be considered not loaded in this casepublic void write(K key, V value) throws java.lang.Exception
CacheLoaderWriter
write
in interface CacheLoaderWriter<K,V>
key
- the key of the mapping being installed or updatedvalue
- the actual value being updated
java.lang.Exception
- if the write operation failedCache.put(Object, Object)
public void writeAll(java.lang.Iterable<? extends java.util.Map.Entry<? extends K,? extends V>> entries) throws BulkCacheWritingException, java.lang.Exception
CacheLoaderWriter
BulkCacheWritingException
must be thrown (see below)
writeAll
in interface CacheLoaderWriter<K,V>
entries
- the key to value mappings
BulkCacheWritingException
- This writer must throw this exception to indicate partial success. The exception
declares which keys were actually written (if any)
java.lang.Exception
- a generic failure. All entries will be considered not written in this caseCache.putAll(java.util.Map)
public void delete(K key) throws java.lang.Exception
CacheLoaderWriter
delete
in interface CacheLoaderWriter<K,V>
key
- the key to delete
java.lang.Exception
- if the write operation failedCache.remove(Object)
public void deleteAll(java.lang.Iterable<? extends K> keys) throws BulkCacheWritingException, java.lang.Exception
CacheLoaderWriter
BulkCacheWritingException
must be thrown (see below)
deleteAll
in interface CacheLoaderWriter<K,V>
keys
- the keys to delete
BulkCacheWritingException
- This writer must throw this exception to indicate partial success. The exception
declares which keys were actually deleted (if any)
java.lang.Exception
- a generic failure. All entries will be considered not deleted in this caseCache.removeAll(java.util.Set)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |