public abstract class TestCacheLoader<K,V> extends TestCacheCallback implements CacheLoader<K,V>
CacheLoader
used in testing. Users should override the "2" method.TestCacheCallback.wasInvoked()
,
TestCacheWriter
callbackError
Constructor and Description |
---|
TestCacheLoader() |
Modifier and Type | Method and Description |
---|---|
V |
load(LoaderHelper<K,V> helper)
Loads a value.
|
abstract V |
load2(LoaderHelper<K,V> helper) |
close, close2, isClosed, waitForInvocation, waitForInvocation, wasInvoked
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
init, initialize
public V load(LoaderHelper<K,V> helper) throws CacheLoaderException
CacheLoader
Region.get(Object, Object)
that triggered this
load.
load
in interface CacheLoader<K,V>
helper
- a LoaderHelper object that is passed in from cache service and provides access to
the key, region, argument, and netSearch
.null
causes Region.get(Object, Object)
to return
null
.CacheLoaderException
Region.get
public abstract V load2(LoaderHelper<K,V> helper) throws CacheLoaderException
CacheLoaderException