HttpRetryPolicy Class
- java.
lang. Object - com.
azure. resourcemanager. appcontainers. models. HttpRetryPolicy
- com.
Implements
public final class HttpRetryPolicy
implements JsonSerializable<HttpRetryPolicy>
Policy that defines http request retry conditions.
Constructor Summary
| Constructor | Description |
|---|---|
| HttpRetryPolicy() |
Creates an instance of Http |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| List<String> |
errors()
Get the errors property: Errors that can trigger a retry. |
|
static
Http |
fromJson(JsonReader jsonReader)
Reads an instance of Http |
|
List<Header |
headers()
Get the headers property: Headers that must be present for a request to be retried. |
| List<Integer> |
httpStatusCodes()
Get the http |
| Long |
initialDelayInMilliseconds()
Get the initial |
| Long |
maxIntervalInMilliseconds()
Get the max |
| Integer |
maxRetries()
Get the max |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Http |
withErrors(List<String> errors)
Set the errors property: Errors that can trigger a retry. |
|
Http |
withHeaders(List<HeaderMatch> headers)
Set the headers property: Headers that must be present for a request to be retried. |
|
Http |
withHttpStatusCodes(List<Integer> httpStatusCodes)
Set the http |
|
Http |
withInitialDelayInMilliseconds(Long initialDelayInMilliseconds)
Set the initial |
|
Http |
withMaxIntervalInMilliseconds(Long maxIntervalInMilliseconds)
Set the max |
|
Http |
withMaxRetries(Integer maxRetries)
Set the max |
Methods inherited from java.lang.Object
Constructor Details
HttpRetryPolicy
public HttpRetryPolicy()
Creates an instance of HttpRetryPolicy class.
Method Details
errors
public List<String> errors()
Get the errors property: Errors that can trigger a retry.
Returns:
fromJson
public static HttpRetryPolicy fromJson(JsonReader jsonReader)
Reads an instance of HttpRetryPolicy from the JsonReader.
Parameters:
Returns:
Throws:
headers
public List<HeaderMatch> headers()
Get the headers property: Headers that must be present for a request to be retried.
Returns:
httpStatusCodes
public List<Integer> httpStatusCodes()
Get the httpStatusCodes property: Additional http status codes that can trigger a retry.
Returns:
initialDelayInMilliseconds
public Long initialDelayInMilliseconds()
Get the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request.
Returns:
maxIntervalInMilliseconds
public Long maxIntervalInMilliseconds()
Get the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries.
Returns:
maxRetries
public Integer maxRetries()
Get the maxRetries property: Maximum number of times a request will retry.
Returns:
toJson
validate
public void validate()
Validates the instance.
withErrors
public HttpRetryPolicy withErrors(List<String> errors)
Set the errors property: Errors that can trigger a retry.
Parameters:
Returns:
withHeaders
public HttpRetryPolicy withHeaders(List<HeaderMatch> headers)
Set the headers property: Headers that must be present for a request to be retried.
Parameters:
Returns:
withHttpStatusCodes
public HttpRetryPolicy withHttpStatusCodes(List<Integer> httpStatusCodes)
Set the httpStatusCodes property: Additional http status codes that can trigger a retry.
Parameters:
Returns:
withInitialDelayInMilliseconds
public HttpRetryPolicy withInitialDelayInMilliseconds(Long initialDelayInMilliseconds)
Set the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request.
Parameters:
Returns:
withMaxIntervalInMilliseconds
public HttpRetryPolicy withMaxIntervalInMilliseconds(Long maxIntervalInMilliseconds)
Set the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries.
Parameters:
Returns:
withMaxRetries
public HttpRetryPolicy withMaxRetries(Integer maxRetries)
Set the maxRetries property: Maximum number of times a request will retry.
Parameters:
Returns: