Class RetryPolicy.Builder
java.lang.Object
com.here.platform.data.client.base.http.settings.RetryPolicy.Builder
- Enclosing interface:
- RetryPolicy
Build a new retry policy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()withInitTimeout(Duration initTimeout) Set initial timeout.withMaxAttempts(int maxAttempts) Set max number of retry attempts.withOverallTimeout(Duration overallTimeout) Set overall timeout.withRequestTimeout(Duration requestTimeout) Set request timeout.withRetriableHttpErrors(Set<Object> retriableHttpErrors) Set http retriable errors.withRetryStrategy(RetryStrategyType retryStrategy) Set retry strategy.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
-
withInitTimeout
Set initial timeout.- Parameters:
initTimeout- initial timeout- Returns:
- this builder
-
withMaxAttempts
Set max number of retry attempts.- Parameters:
maxAttempts- max number of retry attempts- Returns:
- this builder
-
withOverallTimeout
Set overall timeout.- Parameters:
overallTimeout- overall timeout- Returns:
- this builder
-
withRequestTimeout
Set request timeout.- Parameters:
requestTimeout- request timeout- Returns:
- this builder
-
withRetriableHttpErrors
Set http retriable errors.- Parameters:
retriableHttpErrors- http retriable errors- Returns:
- this builder
-
withRetryStrategy
Set retry strategy.- Parameters:
retryStrategy- retry strategy- Returns:
- this builder
-