public class CacheLoaderException extends CustomizationException
It is possible to register a custom behavior how exceptions are rethrown (propagated)
A single loader exception may be thrown multiple times to the application, if
the exception is cached. On the other hand, it is possible to suppress a loader
exception if the cache still contains data. This is controlled by the
ResiliencePolicy or various configuration parameters (see the references).
In case a cached exception is thrown, it contains the string
As a general rule, throwing this exception is delayed as long as possible, when
an associated value for a specific key is requested that has caused the exception.
Cache.getEntry(K) will not throw this exception but
CacheEntry.getValue() will. For bulk methods for example
Cache.getAll(java.lang.Iterable<? extends K>) the exception will be thrown when the respective
value is accessed from the returned map. In case of a general error, for example the loader
produces an exception for every key, exceptions may be thrown as soon as possible
(fail fast principle).
|Constructor and Description|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
cache2k API documentation. Copyright © 2000–2018 headissue GmbH, Munich.