RetryPolicy Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the RetryPolicy class.
public RetryPolicy (int maxNumberOfAttempts, TimeSpan firstRetryInterval, double backoffCoefficient = 1, TimeSpan? maxRetryInterval = default, TimeSpan? retryTimeout = default);
new Microsoft.DurableTask.RetryPolicy : int * TimeSpan * double * Nullable<TimeSpan> * Nullable<TimeSpan> -> Microsoft.DurableTask.RetryPolicy
Public Sub New (maxNumberOfAttempts As Integer, firstRetryInterval As TimeSpan, Optional backoffCoefficient As Double = 1, Optional maxRetryInterval As Nullable(Of TimeSpan) = Nothing, Optional retryTimeout As Nullable(Of TimeSpan) = Nothing)
Parameters
- maxNumberOfAttempts
- Int32
The maximum number of task invocation attempts. Must be 1 or greater.
- firstRetryInterval
- TimeSpan
The amount of time to delay between the first and second attempt.
- backoffCoefficient
- Double
The exponential back-off coefficient used to determine the delay between subsequent retries. Must be 1.0 or greater.
The maximum time to delay between attempts, regardless ofbackoffCoefficient
.
Exceptions
Remarks
The value InfiniteTimeSpan can be used to specify an unlimited timeout for maxRetryInterval
or retryTimeout
.