C# Class Google.Api.Gax.Grpc.BackoffSettings

Backoff settings used within RetrySettings to implement exponential backoff.
Mostra file Open project: googleapis/gax-dotnet Class Usage Examples

Public Methods

Method Description
BackoffSettings ( System.TimeSpan delay, System.TimeSpan maxDelay, double delayMultiplier = 1.0 ) : System

Creates a new instance with the specified settings.

Private Methods

Method Description
NextDelay ( System.TimeSpan currentDelay ) : System.TimeSpan

Works out the next delay from the current one, based on the multiplier and maximum.

Method Details

BackoffSettings() public method

Creates a new instance with the specified settings.
public BackoffSettings ( System.TimeSpan delay, System.TimeSpan maxDelay, double delayMultiplier = 1.0 ) : System
delay System.TimeSpan The initial delay, either for the first retry or as the initial RPC timeout.
maxDelay System.TimeSpan The maximum delay to use. If the increasing delay due to the delay multiplier exceeds this, /// this maximum is used instead.
delayMultiplier double The multiplier to apply to the delay on each iteration; must be greater than or equal to 1.0. /// Defaults to 1.0.
return System