@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class HttpRetryPolicy extends Object implements Serializable, Cloneable, StructuredPojo
An object that represents a retry policy. Specify at least one value for at least one of the types of
RetryEvents, a value for maxRetries, and a value for perRetryTimeout. Both
server-error and gateway-error under httpRetryEvents include the Envoy
reset policy. For more information on the reset policy, see the Envoy documentation.
| Constructor and Description |
|---|
HttpRetryPolicy() |
| Modifier and Type | Method and Description |
|---|---|
HttpRetryPolicy |
clone() |
boolean |
equals(Object obj) |
List<String> |
getHttpRetryEvents()
Specify at least one of the following values.
|
Long |
getMaxRetries()
The maximum number of retry attempts.
|
Duration |
getPerRetryTimeout()
The timeout for each retry attempt.
|
List<String> |
getTcpRetryEvents()
Specify a valid value.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller. |
void |
setHttpRetryEvents(Collection<String> httpRetryEvents)
Specify at least one of the following values.
|
void |
setMaxRetries(Long maxRetries)
The maximum number of retry attempts.
|
void |
setPerRetryTimeout(Duration perRetryTimeout)
The timeout for each retry attempt.
|
void |
setTcpRetryEvents(Collection<String> tcpRetryEvents)
Specify a valid value.
|
String |
toString()
Returns a string representation of this object.
|
HttpRetryPolicy |
withHttpRetryEvents(Collection<String> httpRetryEvents)
Specify at least one of the following values.
|
HttpRetryPolicy |
withHttpRetryEvents(String... httpRetryEvents)
Specify at least one of the following values.
|
HttpRetryPolicy |
withMaxRetries(Long maxRetries)
The maximum number of retry attempts.
|
HttpRetryPolicy |
withPerRetryTimeout(Duration perRetryTimeout)
The timeout for each retry attempt.
|
HttpRetryPolicy |
withTcpRetryEvents(Collection<String> tcpRetryEvents)
Specify a valid value.
|
HttpRetryPolicy |
withTcpRetryEvents(String... tcpRetryEvents)
Specify a valid value.
|
HttpRetryPolicy |
withTcpRetryEvents(TcpRetryPolicyEvent... tcpRetryEvents)
Specify a valid value.
|
public List<String> getHttpRetryEvents()
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
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
public void setHttpRetryEvents(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
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
public HttpRetryPolicy withHttpRetryEvents(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
NOTE: This method appends the values to the existing list (if any). Use
setHttpRetryEvents(java.util.Collection) or withHttpRetryEvents(java.util.Collection) if you
want to override the existing values.
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
public HttpRetryPolicy withHttpRetryEvents(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
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
public void setMaxRetries(Long maxRetries)
The maximum number of retry attempts.
maxRetries - The maximum number of retry attempts.public Long getMaxRetries()
The maximum number of retry attempts.
public HttpRetryPolicy withMaxRetries(Long maxRetries)
The maximum number of retry attempts.
maxRetries - The maximum number of retry attempts.public void setPerRetryTimeout(Duration perRetryTimeout)
The timeout for each retry attempt.
perRetryTimeout - The timeout for each retry attempt.public Duration getPerRetryTimeout()
The timeout for each retry attempt.
public HttpRetryPolicy withPerRetryTimeout(Duration perRetryTimeout)
The timeout for each retry attempt.
perRetryTimeout - The timeout for each retry attempt.public List<String> getTcpRetryEvents()
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.
TcpRetryPolicyEventpublic void setTcpRetryEvents(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.
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.TcpRetryPolicyEventpublic HttpRetryPolicy withTcpRetryEvents(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.
NOTE: This method appends the values to the existing list (if any). Use
setTcpRetryEvents(java.util.Collection) or withTcpRetryEvents(java.util.Collection) if you want
to override the existing values.
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.TcpRetryPolicyEventpublic HttpRetryPolicy withTcpRetryEvents(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.
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.TcpRetryPolicyEventpublic HttpRetryPolicy withTcpRetryEvents(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.
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.TcpRetryPolicyEventpublic String toString()
toString in class ObjectObject.toString()public HttpRetryPolicy clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojoProtocolMarshaller.marshall in interface StructuredPojoprotocolMarshaller - Implementation of ProtocolMarshaller used to marshall this object's data.