- All Known Subinterfaces:
- 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 to
CacheLoaderfor asynchronous operation. There is also version with bulk support,
void load(K key, AsyncCacheLoader.Context<K,V> context, AsyncCacheLoader.Callback<V> callback) throws ExceptionStarts 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 called.
key- key of the value to load
context- additional context information for the load operation
callback- interface to notify for load completion
Exception- an exception, if the load operation cannot be started