Package ai.vespa.util.http.hc4.retry
Class DelayedResponseLevelRetryHandler.Builder
java.lang.Object
ai.vespa.util.http.hc4.retry.DelayedResponseLevelRetryHandler.Builder
- Enclosing class:
- DelayedResponseLevelRetryHandler
-
Method Summary
Modifier and TypeMethodDescriptionbuild()onRetry(RetryConsumer<org.apache.http.HttpResponse> consumer) onRetryFailed(RetryFailedConsumer<org.apache.http.HttpResponse> consumer) retryFor(RetryPredicate<org.apache.http.HttpResponse> predicate) retryForResponses(Predicate<org.apache.http.HttpResponse> predicate) retryForStatusCodes(List<Integer> statusCodes) withExponentialBackoff(Duration startDelay, Duration maxDelay, int maxRetries) withFixedDelay(Duration delay, int maxRetries)
-
Method Details
-
withFixedDelay
public static DelayedResponseLevelRetryHandler.Builder withFixedDelay(Duration delay, int maxRetries) -
withExponentialBackoff
public static DelayedResponseLevelRetryHandler.Builder withExponentialBackoff(Duration startDelay, Duration maxDelay, int maxRetries) -
retryForStatusCodes
-
retryForResponses
public DelayedResponseLevelRetryHandler.Builder retryForResponses(Predicate<org.apache.http.HttpResponse> predicate) -
retryFor
public DelayedResponseLevelRetryHandler.Builder retryFor(RetryPredicate<org.apache.http.HttpResponse> predicate) -
onRetry
public DelayedResponseLevelRetryHandler.Builder onRetry(RetryConsumer<org.apache.http.HttpResponse> consumer) -
onRetryFailed
public DelayedResponseLevelRetryHandler.Builder onRetryFailed(RetryFailedConsumer<org.apache.http.HttpResponse> consumer) -
build
-