Class ExponentialBackoff
A retry strategy with back-off parameters for calculating the exponential delay between retries.
Namespace: Umbraco.Cms.Infrastructure.Persistence.FaultHandling.Strategies
Assembly: Umbraco.Infrastructure.dll
Syntax
public class ExponentialBackoff : RetryStrategy
Constructors
View SourceExponentialBackoff()
Initializes a new instance of the Exponential
Declaration
public ExponentialBackoff()
ExponentialBackoff(Int32, TimeSpan, TimeSpan, TimeSpan)
Initializes a new instance of the Exponential
Declaration
public ExponentialBackoff(int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff)
Parameters
Type | Name | Description |
---|---|---|
System. |
retryCount | The maximum number of retry attempts. |
Time |
minBackoff | The minimum back-off time |
Time |
maxBackoff | The maximum back-off time. |
Time |
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 Exponential
Declaration
public ExponentialBackoff(string name, int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of the retry strategy. |
System. |
retryCount | The maximum number of retry attempts. |
Time |
minBackoff | The minimum back-off time |
Time |
maxBackoff | The maximum back-off time. |
Time |
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 Exponential
Declaration
public ExponentialBackoff(string name, int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff, bool firstFastRetry)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of the retry strategy. |
System. |
retryCount | The maximum number of retry attempts. |
Time |
minBackoff | The minimum back-off time |
Time |
maxBackoff | The maximum back-off time. |
Time |
deltaBackoff | The value that will be used for calculating a random delta in the exponential delay between retries. |
System. |
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 |
---|---|
Should |
The ShouldRetry delegate. |