public final class RequestRetryOptions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static RequestRetryOptions |
DEFAULT
An object representing default retry values: Exponential backoff, maxTries=4, tryTimeout=30, retryDelayInMs=4,
maxRetryDelayInMs=120, secondayHost=null.
|
Constructor and Description |
---|
RequestRetryOptions(RetryPolicyType retryPolicyType,
int maxTries,
int tryTimeout,
java.lang.Long retryDelayInMs,
java.lang.Long maxRetryDelayInMs,
java.lang.String secondaryHost)
Configures how the
HttpPipeline should retry requests. |
Modifier and Type | Method and Description |
---|---|
int |
getMaxTries() |
java.lang.String |
getSecondaryHost() |
int |
getTryTimeout() |
public static final RequestRetryOptions DEFAULT
public RequestRetryOptions(RetryPolicyType retryPolicyType, int maxTries, int tryTimeout, java.lang.Long retryDelayInMs, java.lang.Long maxRetryDelayInMs, java.lang.String secondaryHost)
HttpPipeline
should retry requests.retryPolicyType
- A RetryPolicyType
specifying the type of retry pattern to use.maxTries
- Specifies the maximum number of attempts an operation will be tried before producing an error
(0=default). A value of null
means that you accept our default policy. A value of 1 means 1 try and
no retries.tryTimeout
- Indicates the maximum time allowed for any single try of an HTTP request.
A value of null
means that you accept our default timeout. NOTE: When transferring large amounts
of data, the default TryTimeout will probably not be sufficient. You should override this value
based on the bandwidth available to the host machine and proximity to the Storage service. A good
starting point may be something like (60 seconds per MB of anticipated-payload-size).retryDelayInMs
- Specifies the amount of delay to use before retrying an operation (0=default).
The delay increases (exponentially or linearly) with each retry up to a maximum specified by
MaxRetryDelay. If you specify 0, then you must also specify 0 for MaxRetryDelay.maxRetryDelayInMs
- Specifies the maximum delay allowed before retrying an operation (0=default).
If you specify 0, then you must also specify 0 for RetryDelay.secondaryHost
- If a secondaryHost is specified, retries will be tried against this host. If secondaryHost is null
(the default) then operations are not retried against another host. NOTE: Before setting this field, make
sure you understand the issues around reading stale and potentially-inconsistent data at this webpage:
https://docs.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrspublic int getMaxTries()
public int getTryTimeout()
public java.lang.String getSecondaryHost()
null
(the default) then operations are not retried against another host. NOTE: Before setting this field, make
sure you understand the issues around reading stale and potentially-inconsistent data at this webpage:
https://docs.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs