public interface RetryListener
RetryOperations can chose to issue callbacks to an
interceptor during the retry lifecycle.| Modifier and Type | Method and Description |
|---|---|
<T,E extends Throwable> |
close(RetryContext context,
RetryCallback<T,E> callback,
Throwable throwable)
Called after the final attempt (successful or not).
|
<T,E extends Throwable> |
onError(RetryContext context,
RetryCallback<T,E> callback,
Throwable throwable)
Called after every unsuccessful attempt at a retry.
|
<T,E extends Throwable> |
open(RetryContext context,
RetryCallback<T,E> callback)
Called before the first attempt in a retry.
|
<T,E extends Throwable> boolean open(RetryContext context, RetryCallback<T,E> callback)
RetryOperations. The whole retry can be vetoed by returning
false from this method, in which case a TerminatedRetryException
will be thrown.T - the type of object returned by the callbackE - the type of exception it declares may be throwncontext - the current RetryContext.callback - the current RetryCallback.<T,E extends Throwable> void close(RetryContext context, RetryCallback<T,E> callback, Throwable throwable)
E - the exception typeT - the return valuecontext - the current RetryContext.callback - the current RetryCallback.throwable - the last exception that was thrown by the callback.<T,E extends Throwable> void onError(RetryContext context, RetryCallback<T,E> callback, Throwable throwable)
T - the return valueE - the exception to throwcontext - the current RetryContext.callback - the current RetryCallback.throwable - the last exception that was thrown by the callback.Copyright © 2016 SpringSource. All rights reserved.