public class CacheFailureException extends RuntimeException
RuntimeException
thrown when an operation making use of a cache fails because the
cache cannot be initialised, or could not be updated for an unacceptable period.Modifier and Type | Field and Description |
---|---|
protected String |
cacheName |
protected org.threeten.bp.Duration |
durationOfFailure |
Constructor and Description |
---|
CacheFailureException(String message,
String cacheName,
org.threeten.bp.Duration durationOfFailure,
Throwable cause)
Creates an instance of
CacheFailureException with the supplied message, cache name,
period of failure and cause. |
CacheFailureException(String message,
String cacheName,
Throwable cause)
Creates an instance of
CacheFailureException with the supplied message, cache name
and cause. |
Modifier and Type | Method and Description |
---|---|
String |
getCacheName()
Gets the name of the cache that experienced the failure.
|
org.threeten.bp.Duration |
getDurationOfFailure()
Gets the duration over which the failure persisted before the exception was thrown.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
protected String cacheName
protected org.threeten.bp.Duration durationOfFailure
public CacheFailureException(String message, String cacheName, Throwable cause)
CacheFailureException
with the supplied message, cache name
and cause. The cache name is used to prefix the supplied message as follows:
Failed to load <em>cacheName</em> cache: <em>message</em>
message
- the messagecacheName
- the cache namecause
- the root cause of the exceptionpublic CacheFailureException(String message, String cacheName, org.threeten.bp.Duration durationOfFailure, Throwable cause)
CacheFailureException
with the supplied message, cache name,
period of failure and cause. The cache name and duration of failure are used to prefix the
supplied message as follows: Failed to load <em>cacheName</em> cache having retried
for <em>durationOfFailure</em>: <em>message</em>
message
- the messagecacheName
- the cache namedurationOfFailure
- the duration over which the failure has persistedcause
- the root cause of the exceptionpublic String getCacheName()
public org.threeten.bp.Duration getDurationOfFailure()
Copyright © 2018. All rights reserved.