Share via


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CosmosClientBuilder.WithThrottlingRetryOptions(TimeSpan, Int32) 方法

定义

设置重试之间的最长等待时间,以及针对受限制的请求重试的最大次数。

public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithThrottlingRetryOptions (TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests);
member this.WithThrottlingRetryOptions : TimeSpan * int -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder
Public Function WithThrottlingRetryOptions (maxRetryWaitTimeOnThrottledRequests As TimeSpan, maxRetryAttemptsOnThrottledRequests As Integer) As CosmosClientBuilder

参数

maxRetryWaitTimeOnThrottledRequests
TimeSpan

Azure Cosmos DB 服务的最大重试时间跨度。 将忽略小于 1 秒的任何间隔。

maxRetryAttemptsOnThrottledRequests
Int32

该数字指定受限制请求的重试请求的次数。

返回

当前的 CosmosClientBuilder

适用于

另请参阅