Class CacheOnErrorEvent
java.lang.Object
io.github.resilience4j.cache.event.CacheOnErrorEvent
- All Implemented Interfaces:
CacheEvent
public class CacheOnErrorEvent
extends java.lang.Object
A CacheEvent which informs that accessing the cache has caused an exception.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.resilience4j.cache.event.CacheEvent
CacheEvent.Type -
Constructor Summary
Constructors Constructor Description CacheOnErrorEvent(java.lang.String cacheName, java.lang.Throwable throwable) -
Method Summary
Modifier and Type Method Description java.lang.StringgetCacheName()Returns the name of the Cache which has created the event.java.time.ZonedDateTimegetCreationTime()Returns the creation time of Cache event.CacheEvent.TypegetEventType()Returns the type of the Cache event.java.lang.ThrowablegetThrowable()java.lang.StringtoString()
-
Constructor Details
-
CacheOnErrorEvent
public CacheOnErrorEvent(java.lang.String cacheName, java.lang.Throwable throwable)
-
-
Method Details
-
getEventType
Description copied from interface:CacheEventReturns the type of the Cache event.- Returns:
- the type of the Cache event
-
getThrowable
public java.lang.Throwable getThrowable() -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
getCacheName
public java.lang.String getCacheName()Description copied from interface:CacheEventReturns the name of the Cache which has created the event.- Specified by:
getCacheNamein interfaceCacheEvent- Returns:
- the name of the Cache which has created the event
-
getCreationTime
public java.time.ZonedDateTime getCreationTime()Description copied from interface:CacheEventReturns the creation time of Cache event.- Specified by:
getCreationTimein interfaceCacheEvent- Returns:
- the creation time of Cache event
-