Table of Contents

Class RetryOptions

Namespace
Microsoft.Azure.WebJobs
Assembly
Microsoft.Azure.WebJobs.Extensions.DurableTask.dll

Defines retry policies that can be passed as parameters to various operations.

public class RetryOptions
Inheritance
RetryOptions
Inherited Members

Constructors

RetryOptions(TimeSpan, int)

Creates a new instance RetryOptions with the supplied first retry and max attempts.

public RetryOptions(TimeSpan firstRetryInterval, int maxNumberOfAttempts)

Parameters

firstRetryInterval TimeSpan

Timespan to wait for the first retry.

maxNumberOfAttempts int

Max number of attempts to retry.

Exceptions

ArgumentException

The firstRetryInterval value must be greater than Zero.

Properties

BackoffCoefficient

Gets or sets the backoff coefficient.

public double BackoffCoefficient { get; set; }

Property Value

double

The backoff coefficient used to determine rate of increase of backoff. Defaults to 1.

FirstRetryInterval

Gets or sets the first retry interval.

public TimeSpan FirstRetryInterval { get; set; }

Property Value

TimeSpan

The TimeSpan to wait for the first retries.

Handle

Gets or sets a delegate to call on exception to determine if retries should proceed.

public Func<Exception, bool> Handle { get; set; }

Property Value

Func<Exception, bool>

The delegate to handle exception to determie if retries should proceed.

MaxNumberOfAttempts

Gets or sets the max number of attempts.

public int MaxNumberOfAttempts { get; set; }

Property Value

int

The maximum number of retry attempts.

MaxRetryInterval

Gets or sets the max retry interval.

public TimeSpan MaxRetryInterval { get; set; }

Property Value

TimeSpan

The TimeSpan of the max retry interval, defaults to MaxValue.

RetryTimeout

Gets or sets the timeout for retries.

public TimeSpan RetryTimeout { get; set; }

Property Value

TimeSpan

The TimeSpan timeout for retries, defaults to MaxValue.