public final class RetryImpl.ContextImpl extends java.lang.Object implements Retry.Context<T>
| Modifier and Type | Method and Description |
|---|---|
void |
onComplete()
Records a successful call or retryable call with the needed generated retry events.
|
void |
onError(java.lang.Exception exception)
Handles a checked exception
|
boolean |
onResult(T result) |
void |
onRuntimeError(java.lang.RuntimeException runtimeException)
Handles a runtime exception
|
void |
onSuccess()
Deprecated.
since 1.2.0
|
@Deprecated public void onSuccess()
Retry.ContextonSuccess in interface Retry.Context<T>public void onComplete()
Retry.ContextRetryOnSuccessEvent. When the retry reaches the max retries limit, it will generate a
RetryOnErrorEvent with last exception or MaxRetriesExceeded if no other
exceptions is thrown.onComplete in interface Retry.Context<T>public boolean onResult(T result)
onResult in interface Retry.Context<T>result - the returned result from the called logicpublic void onError(java.lang.Exception exception)
throws java.lang.Exception
Retry.ContextonError in interface Retry.Context<T>exception - the exception to handlejava.lang.Exception - when retry count has exceededpublic void onRuntimeError(java.lang.RuntimeException runtimeException)
Retry.ContextonRuntimeError in interface Retry.Context<T>runtimeException - the exception to handle