Interface HttpRetryPolicy.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<HttpRetryPolicy.Builder,HttpRetryPolicy>,SdkBuilder<HttpRetryPolicy.Builder,HttpRetryPolicy>,SdkPojo
- Enclosing class:
- HttpRetryPolicy
public static interface HttpRetryPolicy.Builder extends SdkPojo, CopyableBuilder<HttpRetryPolicy.Builder,HttpRetryPolicy>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description HttpRetryPolicy.BuilderhttpRetryEvents(String... httpRetryEvents)Specify at least one of the following values.HttpRetryPolicy.BuilderhttpRetryEvents(Collection<String> httpRetryEvents)Specify at least one of the following values.HttpRetryPolicy.BuildermaxRetries(Long maxRetries)The maximum number of retry attempts.default HttpRetryPolicy.BuilderperRetryTimeout(Consumer<Duration.Builder> perRetryTimeout)The timeout for each retry attempt.HttpRetryPolicy.BuilderperRetryTimeout(Duration perRetryTimeout)The timeout for each retry attempt.HttpRetryPolicy.BuildertcpRetryEvents(Collection<TcpRetryPolicyEvent> tcpRetryEvents)Specify a valid value.HttpRetryPolicy.BuildertcpRetryEvents(TcpRetryPolicyEvent... tcpRetryEvents)Specify a valid value.HttpRetryPolicy.BuildertcpRetryEventsWithStrings(String... tcpRetryEvents)Specify a valid value.HttpRetryPolicy.BuildertcpRetryEventsWithStrings(Collection<String> tcpRetryEvents)Specify a valid value.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
httpRetryEvents
HttpRetryPolicy.Builder httpRetryEvents(Collection<String> httpRetryEvents)
Specify at least one of the following values.
-
server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511
-
gateway-error – HTTP status codes 502, 503, and 504
-
client-error – HTTP status code 409
-
stream-error – Retry on refused stream
- Parameters:
httpRetryEvents- Specify at least one of the following values.-
server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511
-
gateway-error – HTTP status codes 502, 503, and 504
-
client-error – HTTP status code 409
-
stream-error – Retry on refused stream
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
httpRetryEvents
HttpRetryPolicy.Builder httpRetryEvents(String... httpRetryEvents)
Specify at least one of the following values.
-
server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511
-
gateway-error – HTTP status codes 502, 503, and 504
-
client-error – HTTP status code 409
-
stream-error – Retry on refused stream
- Parameters:
httpRetryEvents- Specify at least one of the following values.-
server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511
-
gateway-error – HTTP status codes 502, 503, and 504
-
client-error – HTTP status code 409
-
stream-error – Retry on refused stream
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
maxRetries
HttpRetryPolicy.Builder maxRetries(Long maxRetries)
The maximum number of retry attempts.
- Parameters:
maxRetries- The maximum number of retry attempts.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
perRetryTimeout
HttpRetryPolicy.Builder perRetryTimeout(Duration perRetryTimeout)
The timeout for each retry attempt.
- Parameters:
perRetryTimeout- The timeout for each retry attempt.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
perRetryTimeout
default HttpRetryPolicy.Builder perRetryTimeout(Consumer<Duration.Builder> perRetryTimeout)
The timeout for each retry attempt.
This is a convenience method that creates an instance of theDuration.Builderavoiding the need to create one manually viaDuration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toperRetryTimeout(Duration).- Parameters:
perRetryTimeout- a consumer that will call methods onDuration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
perRetryTimeout(Duration)
-
tcpRetryEventsWithStrings
HttpRetryPolicy.Builder tcpRetryEventsWithStrings(Collection<String> tcpRetryEvents)
Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
- Parameters:
tcpRetryEvents- Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tcpRetryEventsWithStrings
HttpRetryPolicy.Builder tcpRetryEventsWithStrings(String... tcpRetryEvents)
Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
- Parameters:
tcpRetryEvents- Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tcpRetryEvents
HttpRetryPolicy.Builder tcpRetryEvents(Collection<TcpRetryPolicyEvent> tcpRetryEvents)
Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
- Parameters:
tcpRetryEvents- Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tcpRetryEvents
HttpRetryPolicy.Builder tcpRetryEvents(TcpRetryPolicyEvent... tcpRetryEvents)
Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.
- Parameters:
tcpRetryEvents- Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-