Package co.elastic.clients.transport
Class RetryConfig.Builder
java.lang.Object
co.elastic.clients.transport.RetryConfig.Builder
- Enclosing class:
- RetryConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbackoffPolicy(BackoffPolicy policy) PassingBackoffPolicy.noBackoff()(ornull) explicitly disables retries, likeRetryConfig.disabled().build()final RetryConfig.BuilderretryableExceptions(Class<? extends Throwable>... exceptions) retryableExceptions(Set<Class<? extends Throwable>> exceptions) Sets the exception types that should trigger a retry.retryableStatuses(Integer... statuses) retryableStatuses(Set<Integer> statuses) Sets the HTTP status codes that should trigger a retry.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
backoffPolicy
PassingBackoffPolicy.noBackoff()(ornull) explicitly disables retries, likeRetryConfig.disabled(). -
retryableStatuses
Sets the HTTP status codes that should trigger a retry. Pass an empty set to disable status-based retries. -
retryableStatuses
-
retryableExceptions
Sets the exception types that should trigger a retry. Pass an empty set to disable exception-based retries. -
retryableExceptions
@SafeVarargs public final RetryConfig.Builder retryableExceptions(Class<? extends Throwable>... exceptions) -
build
-