public sealed class RetryTiming
Reference documentation and code samples for the Google Cloud Storage v1 API class RetryTiming.
Options to control the delays between attempts when retrying failed API requests. This class is immutable.
Namespace
GoogleGoogle.CloudGoogle.Cloud.StorageV1Assembly
Google.Cloud.Storage.V1.dll
Constructors
RetryTiming(TimeSpan, TimeSpan, double)
public RetryTiming(TimeSpan initialBackoff, TimeSpan maxBackoff, double backoffMultiplier)
Creates an instance with the specified values.
Parameters | |
---|---|
Name | Description |
initialBackoff | TimeSpan Initial backoff for retry. Must be non-negative. |
maxBackoff | TimeSpan Maximum backoff for retry. Must be greater than or equal to |
backoffMultiplier | double Backoff multiplier for retry. Must be greater than or equal to 1.0. |
Properties
BackoffMultiplier
public double BackoffMultiplier { get; }
The multiplier to apply to the previous backoff on each iteration, leading to exponential backoff.
Property Value | |
---|---|
Type | Description |
double |
Default
public static RetryTiming Default { get; }
Returns the retry timing configurations all set to default.
Property Value | |
---|---|
Type | Description |
RetryTiming |
DefaultBackoffMultiplier
public static double DefaultBackoffMultiplier { get; }
The default maximum backoff multiplier to be applied on each iteration. The default is 2.
Property Value | |
---|---|
Type | Description |
double |
DefaultInitialBackoff
public static TimeSpan DefaultInitialBackoff { get; }
The default initial backoff time between the first attempt and the first retry. The default is 1 second.
Property Value | |
---|---|
Type | Description |
TimeSpan |
DefaultMaxBackoff
public static TimeSpan DefaultMaxBackoff { get; }
The default maximum backoff time between retries. The default is 32 seconds.
Property Value | |
---|---|
Type | Description |
TimeSpan |
InitialBackoff
public TimeSpan InitialBackoff { get; }
The backoff time between the first attempt and the first retry.
Property Value | |
---|---|
Type | Description |
TimeSpan |
MaxBackoff
public TimeSpan MaxBackoff { get; }
Maximum backoff time between retries.
Property Value | |
---|---|
Type | Description |
TimeSpan |
Methods
WithBackoffMultiplier(double)
public RetryTiming WithBackoffMultiplier(double backoffMultiplier)
Returns the existing retry timings configurations using the specified backoff multiplier.
Parameter | |
---|---|
Name | Description |
backoffMultiplier | double The new value for BackoffMultiplier. |
Returns | |
---|---|
Type | Description |
RetryTiming | A new instance based on the existing values, but with the specified backoff multiplier. |
WithInitialBackoff(TimeSpan)
public RetryTiming WithInitialBackoff(TimeSpan initialBackoff)
Returns a new instance with the same values as the current instance, but with the specified initial backoff.
Parameter | |
---|---|
Name | Description |
initialBackoff | TimeSpan The new value for InitialBackoff. |
Returns | |
---|---|
Type | Description |
RetryTiming | A new instance based on the existing values, but with the specified initial backoff. |
WithMaxBackoff(TimeSpan)
public RetryTiming WithMaxBackoff(TimeSpan maxBackoff)
Returns the existing retry timings configurations using the specified maximum backoff.
Parameter | |
---|---|
Name | Description |
maxBackoff | TimeSpan The new value for MaxBackoff. |
Returns | |
---|---|
Type | Description |
RetryTiming | A new instance based on the existing values, but with the specified max backoff. |