88 строки
5.7 KiB
YAML
88 строки
5.7 KiB
YAML
### 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 <xref uid=\"com.azure.core.http.policy.RetryPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryPolicy\"></xref>."
|
|
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: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
|
|
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: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public abstract Duration calculateRetryDelay(int retryAttempts)"
|
|
desc: "Computes the delay between each retry."
|
|
returns:
|
|
description: "The delay duration before the next retry."
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
|
|
- 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: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
|
|
- 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 <xref uid=\"com.azure.core.http.HttpResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpResponse\"></xref> if the retry attempts are less than <xref uid=\"com.azure.core.http.policy.RetryStrategy.getMaxRetries()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getMaxRetries()\"></xref>."
|
|
modifiers:
|
|
- "default"
|
|
parameters:
|
|
- description: "The response from the previous attempt."
|
|
name: "httpResponse"
|
|
type: "<xref href=\"com.azure.core.http.HttpResponse?alt=com.azure.core.http.HttpResponse&text=HttpResponse\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public default boolean shouldRetry(HttpResponse httpResponse)"
|
|
desc: "This method is consulted to determine if a retry attempt should be made for the given <xref uid=\"com.azure.core.http.HttpResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpResponse\"></xref> if the retry attempts are less than <xref uid=\"com.azure.core.http.policy.RetryStrategy.getMaxRetries()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getMaxRetries()\"></xref>."
|
|
returns:
|
|
description: "Whether a retry should be attempted."
|
|
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
|
|
- 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 <xref uid=\"java.lang.Throwable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Throwable\"></xref> propagated when the request failed to send."
|
|
modifiers:
|
|
- "default"
|
|
parameters:
|
|
- description: "The <xref uid=\"java.lang.Throwable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Throwable\"></xref> thrown during the previous attempt."
|
|
name: "throwable"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html\">Throwable</a>"
|
|
syntax: "public default boolean shouldRetryException(Throwable throwable)"
|
|
desc: "This method is consulted to determine if a retry attempt should be made for the given <xref uid=\"java.lang.Throwable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Throwable\"></xref> propagated when the request failed to send."
|
|
returns:
|
|
description: "Whether a retry should be attempted."
|
|
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
|
|
type: "interface"
|
|
desc: "The interface for determining the retry strategy used in <xref uid=\"com.azure.core.http.policy.RetryPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryPolicy\"></xref>."
|
|
metadata: {}
|
|
package: "com.azure.core.http.policy"
|
|
artifact: com.azure:azure-core:1.32.0
|