Class ExponentialBackOff
Implementation of IBack
Inheritance
Implements
Inherited Members
Namespace: Google.Apis.Util
Assembly: Google.Apis.Core.dll
Syntax
public class ExponentialBackOff : IBackOff
Constructors
ExponentialBackOff()
Constructs a new exponential back-off with default values.
Declaration
public ExponentialBackOff()
ExponentialBackOff(TimeSpan, Int32)
Constructs a new exponential back-off with the given delta and maximum retries.
Declaration
public ExponentialBackOff(TimeSpan deltaBackOff, int maximumNumOfRetries = 10)
Parameters
Type | Name | Description |
---|---|---|
System. |
deltaBackOff | |
System. |
maximumNumOfRetries |
Properties
DeltaBackOff
Gets the delta time span used to generate a random milliseconds to add to the next back-off.
If the value is System.
Declaration
public TimeSpan DeltaBackOff { get; }
Property Value
Type | Description |
---|---|
System. |
MaxNumOfRetries
Gets the maximum number of retries. Default value is 10
.
Declaration
public int MaxNumOfRetries { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
GetNextBackOff(Int32)
Gets the a time span to wait before next retry. If the current retry reached the maximum number of retries,
the returned value is System.
Declaration
public TimeSpan GetNextBackOff(int currentRetry)
Parameters
Type | Name | Description |
---|---|---|
System. |
currentRetry |
Returns
Type | Description |
---|---|
System. |