public interface AsyncCacheLoader<K,V>
CacheLoader
for asynchronous operation.CacheLoader
Modifier and Type | Interface and Description |
---|---|
static interface |
AsyncCacheLoader.Callback<V>
Callback for async cache load.
|
static interface |
AsyncCacheLoader.Context<K,V>
Relevant context information for a single load request.
|
Modifier and Type | Method and Description |
---|---|
void |
load(K key,
AsyncCacheLoader.Context<K,V> context,
AsyncCacheLoader.Callback<V> callback)
Starts an asynchronous load operation.
|
void load(K key, AsyncCacheLoader.Context<K,V> context, AsyncCacheLoader.Callback<V> callback) throws Exception
If this call throws an exception, it is assumed that the load operation was not started and the callback will not called.
key
- key of the value to loadcontext
- additional context information for the load operationcallback
- interface to notify for load completionException
- an exception, if the load operation cannot be startedcache2k API documentation. Copyright © 2000–2020 headissue GmbH, Munich.