@Immutable
public final class RetryException
extends java.lang.Exception
Retryer
succeeded. If the last Attempt
resulted in an Exception, it is set as
the cause of the RetryException
.Constructor and Description |
---|
RetryException(int numberOfFailedAttempts,
Attempt<?> lastFailedAttempt)
If the last
Attempt had an Exception, ensure it is available in
the stack trace. |
RetryException(java.lang.String message,
int numberOfFailedAttempts,
Attempt<?> lastFailedAttempt)
If the last
Attempt had an Exception, ensure it is available in
the stack trace. |
Modifier and Type | Method and Description |
---|---|
Attempt<?> |
getLastFailedAttempt()
Returns the last failed attempt
|
int |
getNumberOfFailedAttempts()
Returns the number of failed attempts
|
public RetryException(int numberOfFailedAttempts, @Nonnull Attempt<?> lastFailedAttempt)
Attempt
had an Exception, ensure it is available in
the stack trace.numberOfFailedAttempts
- times we've tried and failedlastFailedAttempt
- what happened the last time we failedpublic RetryException(java.lang.String message, int numberOfFailedAttempts, Attempt<?> lastFailedAttempt)
Attempt
had an Exception, ensure it is available in
the stack trace.message
- Exception description to be added to the stack tracenumberOfFailedAttempts
- times we've tried and failedlastFailedAttempt
- what happened the last time we failedpublic int getNumberOfFailedAttempts()
public Attempt<?> getLastFailedAttempt()