@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
.
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()
An object that represents a duration of time.
|
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)
An object that represents a duration of time.
|
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)
An object that represents a duration of time.
|
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)
An object that represents a duration of time.
perRetryTimeout
- An object that represents a duration of time.public Duration getPerRetryTimeout()
An object that represents a duration of time.
public HttpRetryPolicy withPerRetryTimeout(Duration perRetryTimeout)
An object that represents a duration of time.
perRetryTimeout
- An object that represents a duration of time.public List<String> getTcpRetryEvents()
Specify a valid value.
TcpRetryPolicyEvent
public void setTcpRetryEvents(Collection<String> tcpRetryEvents)
Specify a valid value.
tcpRetryEvents
- Specify a valid value.TcpRetryPolicyEvent
public HttpRetryPolicy withTcpRetryEvents(String... tcpRetryEvents)
Specify a valid value.
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.TcpRetryPolicyEvent
public HttpRetryPolicy withTcpRetryEvents(Collection<String> tcpRetryEvents)
Specify a valid value.
tcpRetryEvents
- Specify a valid value.TcpRetryPolicyEvent
public HttpRetryPolicy withTcpRetryEvents(TcpRetryPolicyEvent... tcpRetryEvents)
Specify a valid value.
tcpRetryEvents
- Specify a valid value.TcpRetryPolicyEvent
public String toString()
toString
in class Object
Object.toString()
public HttpRetryPolicy clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.