Interface RetryStrategyWithContent<T extends Response>
-
- Type Parameters:
T
- the response type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface RetryStrategyWithContent<T extends Response>
Determines whether a failed request should be retried using the content of aResponse
. If you just need theHttpHeaders
to make a decision, useRetryStrategy
for efficiency.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletionStage<Backoff>
shouldRetry(ClientRequestContext ctx, T response)
Returns aCompletionStage
that containsBackoff
which will be used for retry.
-
-
-
Method Detail
-
shouldRetry
CompletionStage<Backoff> shouldRetry(ClientRequestContext ctx, T response)
Returns aCompletionStage
that containsBackoff
which will be used for retry. If the condition does not match, this will returnnull
to stop retry attempt. Note thatResponseTimeoutException
is not retriable for the whole retry, but only for each attempt.- Parameters:
ctx
- theClientRequestContext
of this requestresponse
- theResponse
from the server- See Also:
RetryingClientBuilder.responseTimeoutMillisForEachAttempt(long)
, Per-attempt timeout
-
-