### YamlMime:JavaType
uid: "com.azure.core.http.policy.RetryStrategy"
fullName: "com.azure.core.http.policy.RetryStrategy"
name: "RetryStrategy"
nameWithType: "RetryStrategy"
summary: "The interface for determining the retry strategy used in ."
syntax: "public interface **RetryStrategy**"
fields:
- uid: "com.azure.core.http.policy.RetryStrategy.HTTP_STATUS_TOO_MANY_REQUESTS"
fullName: "com.azure.core.http.policy.RetryStrategy.HTTP_STATUS_TOO_MANY_REQUESTS"
name: "HTTP_STATUS_TOO_MANY_REQUESTS"
nameWithType: "RetryStrategy.HTTP_STATUS_TOO_MANY_REQUESTS"
summary: "HTTP response status code for `Too Many Requests`."
modifiers:
- "static"
- "final"
field:
value: "429"
type: ""
syntax: "public static final int HTTP_STATUS_TOO_MANY_REQUESTS"
desc: "HTTP response status code for `Too Many Requests`."
methods:
- uid: "com.azure.core.http.policy.RetryStrategy.calculateRetryDelay(int)"
fullName: "com.azure.core.http.policy.RetryStrategy.calculateRetryDelay(int retryAttempts)"
name: "calculateRetryDelay(int retryAttempts)"
nameWithType: "RetryStrategy.calculateRetryDelay(int retryAttempts)"
summary: "Computes the delay between each retry."
modifiers:
- "abstract"
parameters:
- description: "The number of retry attempts completed so far."
name: "retryAttempts"
type: ""
syntax: "public abstract Duration calculateRetryDelay(int retryAttempts)"
desc: "Computes the delay between each retry."
returns:
description: "The delay duration before the next retry."
type: "Duration"
- uid: "com.azure.core.http.policy.RetryStrategy.getMaxRetries()"
fullName: "com.azure.core.http.policy.RetryStrategy.getMaxRetries()"
name: "getMaxRetries()"
nameWithType: "RetryStrategy.getMaxRetries()"
summary: "Max number of retry attempts to be make."
modifiers:
- "abstract"
syntax: "public abstract int getMaxRetries()"
desc: "Max number of retry attempts to be make."
returns:
description: "The max number of retry attempts."
type: ""
- uid: "com.azure.core.http.policy.RetryStrategy.shouldRetry(com.azure.core.http.HttpResponse)"
fullName: "com.azure.core.http.policy.RetryStrategy.shouldRetry(HttpResponse httpResponse)"
name: "shouldRetry(HttpResponse httpResponse)"
nameWithType: "RetryStrategy.shouldRetry(HttpResponse httpResponse)"
summary: "This method is consulted to determine if a retry attempt should be made for the given if the retry attempts are less than ."
modifiers:
- "default"
parameters:
- description: "The response from the previous attempt."
name: "httpResponse"
type: ""
syntax: "public default boolean shouldRetry(HttpResponse httpResponse)"
desc: "This method is consulted to determine if a retry attempt should be made for the given if the retry attempts are less than ."
returns:
description: "Whether a retry should be attempted."
type: ""
- uid: "com.azure.core.http.policy.RetryStrategy.shouldRetryCondition(com.azure.core.http.policy.RequestRetryCondition)"
fullName: "com.azure.core.http.policy.RetryStrategy.shouldRetryCondition(RequestRetryCondition requestRetryCondition)"
name: "shouldRetryCondition(RequestRetryCondition requestRetryCondition)"
nameWithType: "RetryStrategy.shouldRetryCondition(RequestRetryCondition requestRetryCondition)"
summary: "This method is consulted to determine if a retry attempt should be made for the given ."
modifiers:
- "default"
parameters:
- description: "The containing information that can be used to\n determine if the request should be retried."
name: "requestRetryCondition"
type: ""
syntax: "public default boolean shouldRetryCondition(RequestRetryCondition requestRetryCondition)"
desc: "This method is consulted to determine if a retry attempt should be made for the given .\n\nBy default, if the contains a non-null , then the method is called, otherwise the method is called."
returns:
description: "Whether a retry should be attempted."
type: ""
- uid: "com.azure.core.http.policy.RetryStrategy.shouldRetryException(java.lang.Throwable)"
fullName: "com.azure.core.http.policy.RetryStrategy.shouldRetryException(Throwable throwable)"
name: "shouldRetryException(Throwable throwable)"
nameWithType: "RetryStrategy.shouldRetryException(Throwable throwable)"
summary: "This method is consulted to determine if a retry attempt should be made for the given propagated when the request failed to send."
modifiers:
- "default"
parameters:
- description: "The thrown during the previous attempt."
name: "throwable"
type: "Throwable"
syntax: "public default boolean shouldRetryException(Throwable throwable)"
desc: "This method is consulted to determine if a retry attempt should be made for the given propagated when the request failed to send."
returns:
description: "Whether a retry should be attempted."
type: ""
type: "interface"
desc: "The interface for determining the retry strategy used in ."
metadata: {}
package: "com.azure.core.http.policy"
artifact: com.azure:azure-core:1.54.0