public final class RequestRetryOptions extends Object
RequestRetryPolicy.| Constructor and Description |
|---|
RequestRetryOptions()
Configures how the
HttpPipeline should retry requests. |
RequestRetryOptions(RetryPolicyType retryPolicyType,
Integer maxTries,
Duration tryTimeout,
Duration retryDelay,
Duration maxRetryDelay,
String secondaryHost)
Configures how the
HttpPipeline should retry requests. |
RequestRetryOptions(RetryPolicyType retryPolicyType,
Integer maxTries,
Integer tryTimeoutInSeconds,
Long retryDelayInMs,
Long maxRetryDelayInMs,
String secondaryHost)
Configures how the
HttpPipeline should retry requests. |
| Modifier and Type | Method and Description |
|---|---|
Duration |
getMaxRetryDelay() |
long |
getMaxRetryDelayInMs()
Deprecated.
Please use
RequestRetryOptions.getTryTimeoutDuration() |
int |
getMaxTries() |
Duration |
getRetryDelay() |
long |
getRetryDelayInMs()
Deprecated.
Please use
RequestRetryOptions.getTryTimeoutDuration() |
String |
getSecondaryHost() |
int |
getTryTimeout()
Deprecated.
Please use
RequestRetryOptions.getTryTimeoutDuration() |
Duration |
getTryTimeoutDuration() |
public RequestRetryOptions()
HttpPipeline should retry requests.public RequestRetryOptions(RetryPolicyType retryPolicyType, Integer maxTries, Integer tryTimeoutInSeconds, Long retryDelayInMs, Long maxRetryDelayInMs, String secondaryHost)
HttpPipeline should retry requests.retryPolicyType - Optional. A RetryPolicyType specifying the type of retry pattern to use, default
value is EXPONENTIAL.maxTries - Optional. Maximum number of attempts an operation will be retried, default is 4.tryTimeoutInSeconds - Optional. Specified the maximum time allowed before a request is cancelled and
assumed failed, default is Integer.MAX_VALUE s.
This value should be based on the bandwidth available to the host machine and proximity to the Storage service, a good starting point may be 60 seconds per MB of anticipated payload size.
retryDelayInMs - Optional. Specifies the amount of delay to use before retrying an operation, default value
is 4ms when retryPolicyType is EXPONENTIAL and 30ms
when retryPolicyType is FIXED.maxRetryDelayInMs - Optional. Specifies the maximum delay allowed before retrying an operation, default
value is 120ms.secondaryHost - Optional. Specified a secondary Storage account to retry requests against, default is none.
Before setting this understand the issues around reading stale and potentially-inconsistent data, view these Azure Docs for more information.
IllegalArgumentException - If getRetryDelayInMs and getMaxRetryDelayInMs are not both null
or non-null or retryPolicyType isn't RetryPolicyType.EXPONENTIAL
or RetryPolicyType.FIXED.public RequestRetryOptions(RetryPolicyType retryPolicyType, Integer maxTries, Duration tryTimeout, Duration retryDelay, Duration maxRetryDelay, String secondaryHost)
HttpPipeline should retry requests.retryPolicyType - Optional. A RetryPolicyType specifying the type of retry pattern to use, default
value is EXPONENTIAL.maxTries - Optional. Maximum number of attempts an operation will be retried, default is 4.tryTimeout - Optional. Specified the maximum time allowed before a request is cancelled and
assumed failed, default is Integer.MAX_VALUE.
This value should be based on the bandwidth available to the host machine and proximity to the Storage service, a good starting point may be 60 seconds per MB of anticipated payload size.
retryDelay - Optional. Specifies the amount of delay to use before retrying an operation, default value
is 4ms when retryPolicyType is EXPONENTIAL and 30ms
when retryPolicyType is FIXED.maxRetryDelay - Optional. Specifies the maximum delay allowed before retrying an operation, default
value is 120ms.secondaryHost - Optional. Specified a secondary Storage account to retry requests against, default is none.
Before setting this understand the issues around reading stale and potentially-inconsistent data, view these Azure Docs for more information.
IllegalArgumentException - If getRetryDelayInMs and getMaxRetryDelayInMs are not both null
or non-null or retryPolicyType isn't RetryPolicyType.EXPONENTIAL
or RetryPolicyType.FIXED.public int getMaxTries()
@Deprecated public int getTryTimeout()
RequestRetryOptions.getTryTimeoutDuration()public Duration getTryTimeoutDuration()
public String getSecondaryHost()
@Deprecated public long getRetryDelayInMs()
RequestRetryOptions.getTryTimeoutDuration()public Duration getRetryDelay()
@Deprecated public long getMaxRetryDelayInMs()
RequestRetryOptions.getTryTimeoutDuration()public Duration getMaxRetryDelay()
Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.