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

StorageRetryOptions interface

存储 Blob 重试选项接口。

属性

maxRetryDelayInMs

自选。 指定重试作之前允许的最大延迟(默认值为 120s 或 120 * 1000ms)。 如果指定 0,则还必须为 retryDelayInMs 指定 0。

maxTries

自选。 最大尝试次数,默认值为 4。 值为 1 表示 1 次尝试,不重试。 小于 1 的值表示默认重试次数。

retryDelayInMs

自选。 指定重试作前要使用的延迟量(默认值为 4s 或 4 * 1000ms)。 延迟增加(指数级或线性),每次重试最多由 maxRetryDelayInMs 指定的最大值。 如果指定 0,则还必须为 maxRetryDelayInMs 指定 0。

retryPolicyType

自选。 StorageRetryPolicyType,默认值为指数重试策略。

secondaryHost

如果指定了 secondaryHost,则会针对此主机尝试重试。 如果 secondaryHost 未定义(默认值),则不会针对另一台主机重试作。

注意:在设置此字段之前,请确保了解在 https://docs.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs 读取过时和可能不一致的数据的问题

tryTimeoutInMs

自选。 指示任意一次尝试 HTTP 请求所允许的最大时间(以毫秒为单位)。 值为零或未定义意味着 SDK 客户端上没有默认超时,将使用 Azure 存储服务器的默认超时策略。

请参阅 https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations

属性详细信息

maxRetryDelayInMs

自选。 指定重试作之前允许的最大延迟(默认值为 120s 或 120 * 1000ms)。 如果指定 0,则还必须为 retryDelayInMs 指定 0。

maxRetryDelayInMs?: number

属性值

number

maxTries

自选。 最大尝试次数,默认值为 4。 值为 1 表示 1 次尝试,不重试。 小于 1 的值表示默认重试次数。

maxTries?: number

属性值

number

retryDelayInMs

自选。 指定重试作前要使用的延迟量(默认值为 4s 或 4 * 1000ms)。 延迟增加(指数级或线性),每次重试最多由 maxRetryDelayInMs 指定的最大值。 如果指定 0,则还必须为 maxRetryDelayInMs 指定 0。

retryDelayInMs?: number

属性值

number

retryPolicyType

自选。 StorageRetryPolicyType,默认值为指数重试策略。

retryPolicyType?: StorageRetryPolicyType

属性值

secondaryHost

如果指定了 secondaryHost,则会针对此主机尝试重试。 如果 secondaryHost 未定义(默认值),则不会针对另一台主机重试作。

注意:在设置此字段之前,请确保了解在 https://docs.microsoft.com/en-us/azure/storage/common/storage-designing-ha-apps-with-ragrs 读取过时和可能不一致的数据的问题

secondaryHost?: string

属性值

string

tryTimeoutInMs

自选。 指示任意一次尝试 HTTP 请求所允许的最大时间(以毫秒为单位)。 值为零或未定义意味着 SDK 客户端上没有默认超时,将使用 Azure 存储服务器的默认超时策略。

请参阅 https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations

tryTimeoutInMs?: number

属性值

number