R - result typeF - failure type@FunctionalInterface public static interface RetryPolicy.DelayFunction<R,F extends Throwable>
RetryPolicy.withDelay(DelayFunction).| Modifier and Type | Method and Description |
|---|---|
Duration |
computeDelay(R result,
F failure,
ExecutionContext context)
Returns the amount of delay before the next retry based on the result or failure of the last attempt and the
execution context (executions so far).
|
Duration computeDelay(R result, F failure, ExecutionContext context)
Notes:
result - the result, if any, of the last attemptfailure - the Throwable thrown, if any, during the last attemptcontext - the ExecutionContext that describes executions so farRetryPolicy.withDelay(DelayFunction),
RetryPolicy.withDelayOn(DelayFunction, Class),
RetryPolicy.withDelayWhen(DelayFunction, Object)Copyright © 2018. All rights reserved.