azure-docs-sdk-java/docs-ref-autogen/com.azure.cosmos.Throttling...

94 строки
7.3 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.cosmos.ThrottlingRetryOptions"
fullName: "com.azure.cosmos.ThrottlingRetryOptions"
name: "ThrottlingRetryOptions"
nameWithType: "ThrottlingRetryOptions"
summary: "Encapsulates retry options in the Azure Cosmos DB database service."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public final class **ThrottlingRetryOptions**"
constructors:
- uid: "com.azure.cosmos.ThrottlingRetryOptions.ThrottlingRetryOptions()"
fullName: "com.azure.cosmos.ThrottlingRetryOptions.ThrottlingRetryOptions()"
name: "ThrottlingRetryOptions()"
nameWithType: "ThrottlingRetryOptions.ThrottlingRetryOptions()"
summary: "Creates a new instance of the Retry<wbr>Options class and initializes all properties to default values."
syntax: "public ThrottlingRetryOptions()"
desc: "Creates a new instance of the RetryOptions class and initializes all properties to default values."
methods:
- uid: "com.azure.cosmos.ThrottlingRetryOptions.getMaxRetryAttemptsOnThrottledRequests()"
fullName: "com.azure.cosmos.ThrottlingRetryOptions.getMaxRetryAttemptsOnThrottledRequests()"
name: "getMaxRetryAttemptsOnThrottledRequests()"
nameWithType: "ThrottlingRetryOptions.getMaxRetryAttemptsOnThrottledRequests()"
summary: "Gets the maximum number of retries in the case where the request fails because the service has applied rate limiting on the client."
syntax: "public int getMaxRetryAttemptsOnThrottledRequests()"
desc: "Gets the maximum number of retries in the case where the request fails because the service has applied rate limiting on the client."
returns:
description: "the maximum number of retries."
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.ThrottlingRetryOptions.getMaxRetryWaitTime()"
fullName: "com.azure.cosmos.ThrottlingRetryOptions.getMaxRetryWaitTime()"
name: "getMaxRetryWaitTime()"
nameWithType: "ThrottlingRetryOptions.getMaxRetryWaitTime()"
summary: "Gets the maximum retry duration."
syntax: "public Duration getMaxRetryWaitTime()"
desc: "Gets the maximum retry duration."
returns:
description: "the maximum retry duration."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- uid: "com.azure.cosmos.ThrottlingRetryOptions.setMaxRetryAttemptsOnThrottledRequests(int)"
fullName: "com.azure.cosmos.ThrottlingRetryOptions.setMaxRetryAttemptsOnThrottledRequests(int maxRetryAttemptsOnThrottledRequests)"
name: "setMaxRetryAttemptsOnThrottledRequests(int maxRetryAttemptsOnThrottledRequests)"
nameWithType: "ThrottlingRetryOptions.setMaxRetryAttemptsOnThrottledRequests(int maxRetryAttemptsOnThrottledRequests)"
summary: "Sets the maximum number of retries in the case where the request fails because the service has applied rate limiting on the client."
parameters:
- description: "the max number of retry attempts on failed requests due to a\n throttle error."
name: "maxRetryAttemptsOnThrottledRequests"
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ThrottlingRetryOptions setMaxRetryAttemptsOnThrottledRequests(int maxRetryAttemptsOnThrottledRequests)"
desc: "Sets the maximum number of retries in the case where the request fails because the service has applied rate limiting on the client.\n\nWhen a client is sending requests faster than the allowed rate, the service will return HttpStatusCode 429 (Too Many Request) to throttle the client. The current implementation in the SDK will then wait for the amount of time the service tells it to wait and retry after the time has elapsed.\n\nThe default value is 9. This means in the case where the request is throttled, the same request will be issued for a maximum of 10 times to the server before an error is returned to the application."
returns:
description: "the RetryOptions."
type: "<xref href=\"com.azure.cosmos.ThrottlingRetryOptions?alt=com.azure.cosmos.ThrottlingRetryOptions&text=ThrottlingRetryOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.ThrottlingRetryOptions.setMaxRetryWaitTime(java.time.Duration)"
fullName: "com.azure.cosmos.ThrottlingRetryOptions.setMaxRetryWaitTime(Duration maxRetryWaitTime)"
name: "setMaxRetryWaitTime(Duration maxRetryWaitTime)"
nameWithType: "ThrottlingRetryOptions.setMaxRetryWaitTime(Duration maxRetryWaitTime)"
summary: "Sets the maximum retry time in seconds."
parameters:
- description: "the maximum duration a request will be retried."
name: "maxRetryWaitTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public ThrottlingRetryOptions setMaxRetryWaitTime(Duration maxRetryWaitTime)"
desc: "Sets the maximum retry time in seconds.\n\nWhen a request fails due to a throttle error, the service sends back a response that contains a value indicating the client should not retry before the time period has elapsed (Retry-After). The MaxRetryWaitTime flag allows the application to set a maximum wait time for all retry attempts. If the cumulative wait time exceeds the MaxRetryWaitTime, the SDK will stop retrying and return the error to the application.\n\nThe default value is 30 seconds."
returns:
description: "the RetryOptions."
type: "<xref href=\"com.azure.cosmos.ThrottlingRetryOptions?alt=com.azure.cosmos.ThrottlingRetryOptions&text=ThrottlingRetryOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.ThrottlingRetryOptions.toString()"
fullName: "com.azure.cosmos.ThrottlingRetryOptions.toString()"
name: "toString()"
nameWithType: "ThrottlingRetryOptions.toString()"
overridden: "java.lang.Object.toString()"
syntax: "public String toString()"
returns:
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
type: "class"
desc: "Encapsulates retry options in the Azure Cosmos DB database service."
metadata: {}
package: "com.azure.cosmos"
artifact: com.azure:azure-cosmos:4.63.3