Package org.cache2k.io
Interface AsyncCacheLoader<K,V>
- 
- All Superinterfaces:
 Customization,DataAware<K,V>,DataAwareCustomization<K,V>
- All Known Subinterfaces:
 AsyncBulkCacheLoader<K,V>
- Functional Interface:
 - This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
@FunctionalInterface public interface AsyncCacheLoader<K,V> extends DataAwareCustomization<K,V>
Alternative interface toCacheLoaderfor asynchronous operation. There is also version with bulk support,AsyncBulkCacheLoader.- Since:
 - 2.0
 - Author:
 - Jens Wilke
 - See Also:
 CacheLoader,AsyncBulkCacheLoader
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceAsyncCacheLoader.Callback<V>Callback for async cache load.static interfaceAsyncCacheLoader.Context<K,V>Relevant context information for a single load request. 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidload(K key, AsyncCacheLoader.Context<K,V> context, AsyncCacheLoader.Callback<V> callback)Starts an asynchronous load operation. 
 - 
 
- 
- 
Method Detail
- 
load
void load(K key, AsyncCacheLoader.Context<K,V> context, AsyncCacheLoader.Callback<V> callback) throws Exception
Starts an asynchronous load operation.If this call throws an exception, it is assumed that the load operation was not started and the callback will not be called.
- Parameters:
 key- key of the value to loadcontext- additional context information for the load operationcallback- interface to notify for load completion- Throws:
 Exception- an exception, if the load operation cannot be started
 
 - 
 
 -