Class ExponentialBackoff
A retry strategy with back-off parameters for calculating the exponential delay between retries.
Namespace: Umbraco.Core.Persistence.FaultHandling.Strategies
Assembly: Umbraco.Core.dll
Syntax
public class ExponentialBackoff : RetryStrategy
Constructors
View SourceExponentialBackoff()
Initializes a new instance of the ExponentialBackoff class.
Declaration
public ExponentialBackoff()
ExponentialBackoff(Int32, TimeSpan, TimeSpan, TimeSpan)
Initializes a new instance of the ExponentialBackoff class.
Declaration
public ExponentialBackoff(int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | retryCount | The maximum number of retry attempts. |
System.TimeSpan | minBackoff | The minimum back-off time |
System.TimeSpan | maxBackoff | The maximum back-off time. |
System.TimeSpan | deltaBackoff | The value that will be used for calculating a random delta in the exponential delay between retries. |
ExponentialBackoff(String, Int32, TimeSpan, TimeSpan, TimeSpan)
Initializes a new instance of the ExponentialBackoff class.
Declaration
public ExponentialBackoff(string name, int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the retry strategy. |
System.Int32 | retryCount | The maximum number of retry attempts. |
System.TimeSpan | minBackoff | The minimum back-off time |
System.TimeSpan | maxBackoff | The maximum back-off time. |
System.TimeSpan | deltaBackoff | The value that will be used for calculating a random delta in the exponential delay between retries. |
ExponentialBackoff(String, Int32, TimeSpan, TimeSpan, TimeSpan, Boolean)
Initializes a new instance of the ExponentialBackoff class.
Declaration
public ExponentialBackoff(string name, int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff, bool firstFastRetry)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the retry strategy. |
System.Int32 | retryCount | The maximum number of retry attempts. |
System.TimeSpan | minBackoff | The minimum back-off time |
System.TimeSpan | maxBackoff | The maximum back-off time. |
System.TimeSpan | deltaBackoff | The value that will be used for calculating a random delta in the exponential delay between retries. |
System.Boolean | firstFastRetry | Indicates whether or not the very first retry attempt will be made immediately whereas the subsequent retries will remain subject to retry interval. |
Methods
View SourceGetShouldRetry()
Returns the corresponding ShouldRetry delegate.
Declaration
public override ShouldRetry GetShouldRetry()
Returns
Type | Description |
---|---|
ShouldRetry | The ShouldRetry delegate. |