public interface CacheOperationCompletionListener extends EventListener
| Modifier and Type | Method and Description |
|---|---|
void |
onCompleted()
Signals the completion of a
Cache.loadAll(java.lang.Iterable<? extends K>, org.cache2k.CacheOperationCompletionListener), Cache.reloadAll(java.lang.Iterable<? extends K>, org.cache2k.CacheOperationCompletionListener) or
Cache.prefetchAll(java.lang.Iterable<? extends K>, org.cache2k.CacheOperationCompletionListener) operation. |
void |
onException(Throwable exception)
The operation could not completed, because of an error.
|
void onCompleted()
Cache.loadAll(java.lang.Iterable<? extends K>, org.cache2k.CacheOperationCompletionListener), Cache.reloadAll(java.lang.Iterable<? extends K>, org.cache2k.CacheOperationCompletionListener) or
Cache.prefetchAll(java.lang.Iterable<? extends K>, org.cache2k.CacheOperationCompletionListener) operation.void onException(Throwable exception)
In the current implementation, there is no condition which raises a call to this method. Errors while loading a value, will be delayed and propagated when the respective key is accessed. This is subject to the resilience configuration.
The method may be used in the future for some general failure condition during load. Applications should propagate the exception properly and not only log it.
cache2k API documentation. Copyright © 2000–2019 headissue GmbH, Munich.