T - the result typepublic static interface 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 void onSuccess()
void onComplete()
RetryOnSuccessEvent. When the retry reaches the max retries limit, it will generate a
RetryOnErrorEvent with last exception or MaxRetriesExceeded if no other
exceptions is thrown.boolean onResult(T result)
result - the returned result from the called logicvoid onError(java.lang.Exception exception)
throws java.lang.Exception
exception - the exception to handlejava.lang.Exception - when retry count has exceededvoid onRuntimeError(java.lang.RuntimeException runtimeException)
runtimeException - the exception to handlejava.lang.RuntimeException - when retry count has exceeded