Class RetryOnErrorEvent
java.lang.Object
io.github.resilience4j.retry.event.RetryOnErrorEvent
- All Implemented Interfaces:
RetryEvent
public class RetryOnErrorEvent
extends java.lang.Object
A RetryEvent which informs that a call has been retried, but still failed, such that the the
maximum number of attempts has been reached. It will not be retried any more.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.resilience4j.retry.event.RetryEvent
RetryEvent.Type -
Constructor Summary
Constructors Constructor Description RetryOnErrorEvent(java.lang.String name, int numberOfAttempts, java.lang.Throwable lastThrowable) -
Method Summary
Modifier and Type Method Description java.time.ZonedDateTimegetCreationTime()Returns the creation time of Retry event.RetryEvent.TypegetEventType()Returns the type of the Retry event.java.lang.ThrowablegetLastThrowable()Returns the last captured Throwable.java.lang.StringgetName()Returns the ID of the Retry.intgetNumberOfRetryAttempts()Returns the number of retry attempts.java.lang.StringtoString()
-
Constructor Details
-
RetryOnErrorEvent
public RetryOnErrorEvent(java.lang.String name, int numberOfAttempts, @Nullable java.lang.Throwable lastThrowable)
-
-
Method Details
-
getEventType
Description copied from interface:RetryEventReturns the type of the Retry event.- Returns:
- the type of the Retry event
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
getName
public java.lang.String getName()Description copied from interface:RetryEventReturns the ID of the Retry.- Specified by:
getNamein interfaceRetryEvent- Returns:
- the ID of the Retry
-
getCreationTime
public java.time.ZonedDateTime getCreationTime()Description copied from interface:RetryEventReturns the creation time of Retry event.- Specified by:
getCreationTimein interfaceRetryEvent- Returns:
- the creation time of Retry event
-
getNumberOfRetryAttempts
public int getNumberOfRetryAttempts()Description copied from interface:RetryEventReturns the number of retry attempts.- Specified by:
getNumberOfRetryAttemptsin interfaceRetryEvent- Returns:
- the the number of retry attempts
-
getLastThrowable
@Nullable public java.lang.Throwable getLastThrowable()Description copied from interface:RetryEventReturns the last captured Throwable.- Specified by:
getLastThrowablein interfaceRetryEvent- Returns:
- the last captured Throwable
-