接口 RetryCallback<T,E extends Throwable>

类型参数:
T - the type of object returned by the callback
E - the type of exception it declares may be thrown
所有已知实现类:
MethodInvocationRetryCallback, RetrySimulator.FailingRetryCallback, StatefulRetryOperationsInterceptor.StatefulMethodInvocationRetryCallback

public interface RetryCallback<T,E extends Throwable>
Callback interface for an operation that can be retried using a RetryOperations.
从以下版本开始:
4.0
作者:
Rob Harrop, Dave Syer
  • 方法概要

    修饰符和类型
    方法
    说明
    Execute an operation with retry semantics.
  • 方法详细资料

    • doWithRetry

      T doWithRetry(RetryContext context) throws E
      Execute an operation with retry semantics. Operations should generally be idempotent, but implementations may choose to implement compensation semantics when an operation is retried.
      参数:
      context - the current retry context.
      返回:
      the result of the successful operation.
      抛出:
      E - of type E if processing fails