RetryOptions class

定義可當做參數傳遞至各種作業的重試原則。

建構函式

RetryOptions(number, number)

使用所提供的第一次重試和最大嘗試,建立 RetryOptions 的新實例。

屬性

backoffCoefficient

重試輪詢係數

firstRetryIntervalInMilliseconds

第一個重試間隔 (毫秒)。 必須大於 0。

maxNumberOfAttempts

嘗試次數上限。

maxRetryIntervalInMilliseconds

重試間隔上限 (毫秒)。

retryTimeoutInMilliseconds

重試的逾時(毫秒)。

建構函式詳細資料

RetryOptions(number, number)

使用所提供的第一次重試和最大嘗試,建立 RetryOptions 的新實例。

new RetryOptions(firstRetryIntervalInMilliseconds: number, maxNumberOfAttempts: number)

參數

firstRetryIntervalInMilliseconds

number

第一個重試間隔 (毫秒)。 必須大於 0。

maxNumberOfAttempts

number

嘗試次數上限。

屬性詳細資料

backoffCoefficient

重試輪詢係數

backoffCoefficient: number

屬性值

number

firstRetryIntervalInMilliseconds

第一個重試間隔 (毫秒)。 必須大於 0。

firstRetryIntervalInMilliseconds: number

屬性值

number

maxNumberOfAttempts

嘗試次數上限。

maxNumberOfAttempts: number

屬性值

number

maxRetryIntervalInMilliseconds

重試間隔上限 (毫秒)。

maxRetryIntervalInMilliseconds: number

屬性值

number

retryTimeoutInMilliseconds

重試的逾時(毫秒)。

retryTimeoutInMilliseconds: number

屬性值

number