你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
RequestRetryOptions Class
- java.
lang. Object - com.
azure. storage. common. policy. RequestRetryOptions
- com.
public final class RequestRetryOptions
Configuration options for RequestRetryPolicy.
Constructor Summary
Constructor | Description |
---|---|
RequestRetryOptions() |
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. |
RequestRetryOptions(RetryPolicyType retryPolicyType, Integer maxTries, Duration tryTimeout, Duration retryDelay, Duration maxRetryDelay, String secondaryHost) |
Configures how the HttpPipeline should retry requests. |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Request |
fromRetryOptions(RetryOptions retryOptions, Duration tryTimeout, String secondaryHost)
Creates new RequestRetryOptions from RetryOptions and let specify storage specific parameters. |
Duration |
getMaxRetryDelay()
Gets the maximum delay allowed between each retry. |
long |
getMaxRetryDelayInMs()
Deprecated
Please use getTryTimeoutDuration()
Gets the maximum delay in milliseconds allowed between each retry. |
int |
getMaxTries()
Gets the maximum number of retries that will be attempted. |
Duration |
getRetryDelay()
Gets the delay between each retry attempt. |
long |
getRetryDelayInMs()
Deprecated
Please use getTryTimeoutDuration()
Gets the delay in milliseconds between each retry attempt. |
String |
getSecondaryHost()
Gets the URI of the secondary host where retries are attempted. |
int |
getTryTimeout()
Deprecated
Please use getTryTimeoutDuration()
Gets the maximum time, in seconds, allowed for a request until it is considered timed out. |
Duration |
getTryTimeoutDuration()
Gets the maximum time allowed for a request until it is considered timed out. |
Methods inherited from java.lang.Object
Constructor Details
RequestRetryOptions
public RequestRetryOptions()
Configures how the HttpPipeline should retry requests.
RequestRetryOptions
public RequestRetryOptions(RetryPolicyType retryPolicyType, Integer maxTries, Integer tryTimeoutInSeconds, Long retryDelayInMs, Long maxRetryDelayInMs, String secondaryHost)
Configures how the HttpPipeline should retry requests.
Parameters:
4
.
4ms
when retryPolicyType
is EXPONENTIAL and 30ms
when retryPolicyType
is FIXED.
120ms
.
RequestRetryOptions
public RequestRetryOptions(RetryPolicyType retryPolicyType, Integer maxTries, Duration tryTimeout, Duration retryDelay, Duration maxRetryDelay, String secondaryHost)
Configures how the HttpPipeline should retry requests.
Parameters:
4
.
4s
when retryPolicyType
is EXPONENTIAL and 30s
when retryPolicyType
is FIXED.
120s
.
Method Details
fromRetryOptions
public static RequestRetryOptions fromRetryOptions(RetryOptions retryOptions, Duration tryTimeout, String secondaryHost)
Creates new RequestRetryOptions from RetryOptions and let specify storage specific parameters.
Parameters:
Returns:
getMaxRetryDelay
public Duration getMaxRetryDelay()
Gets the maximum delay allowed between each retry.
Returns:
getMaxRetryDelayInMs
@Deprecated
public long getMaxRetryDelayInMs()
Deprecated
Gets the maximum delay in milliseconds allowed between each retry.
Returns:
getMaxTries
public int getMaxTries()
Gets the maximum number of retries that will be attempted.
Returns:
getRetryDelay
public Duration getRetryDelay()
Gets the delay between each retry attempt.
Returns:
getRetryDelayInMs
@Deprecated
public long getRetryDelayInMs()
Deprecated
Gets the delay in milliseconds between each retry attempt.
Returns:
getSecondaryHost
public String getSecondaryHost()
Gets the URI of the secondary host where retries are attempted. If this is null then there is no secondary host and all retries are attempted against the original host.
Returns:
getTryTimeout
@Deprecated
public int getTryTimeout()
Deprecated
Gets the maximum time, in seconds, allowed for a request until it is considered timed out.
Returns:
getTryTimeoutDuration
public Duration getTryTimeoutDuration()
Gets the maximum time allowed for a request until it is considered timed out.
Returns: