Google Cloud Storage v1 API - Class RetryTiming (4.9.0)

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.

Inheritance

object > RetryTiming

Namespace

Google.Cloud.Storage.V1

Assembly

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
NameDescription
initialBackoffTimeSpan

Initial backoff for retry. Must be non-negative.

maxBackoffTimeSpan

Maximum backoff for retry. Must be greater than or equal to initialBackoff.

backoffMultiplierdouble

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
TypeDescription
double

Default

public static RetryTiming Default { get; }

Returns the retry timing configurations all set to default.

Property Value
TypeDescription
RetryTiming

DefaultBackoffMultiplier

public static double DefaultBackoffMultiplier { get; }

The default maximum backoff multiplier to be applied on each iteration. The default is 2.

Property Value
TypeDescription
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
TypeDescription
TimeSpan

DefaultMaxBackoff

public static TimeSpan DefaultMaxBackoff { get; }

The default maximum backoff time between retries. The default is 32 seconds.

Property Value
TypeDescription
TimeSpan

InitialBackoff

public TimeSpan InitialBackoff { get; }

The backoff time between the first attempt and the first retry.

Property Value
TypeDescription
TimeSpan

MaxBackoff

public TimeSpan MaxBackoff { get; }

Maximum backoff time between retries.

Property Value
TypeDescription
TimeSpan

Methods

WithBackoffMultiplier(double)

public RetryTiming WithBackoffMultiplier(double backoffMultiplier)

Returns the existing retry timings configurations using the specified backoff multiplier.

Parameter
NameDescription
backoffMultiplierdouble

The new value for BackoffMultiplier.

Returns
TypeDescription
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
NameDescription
initialBackoffTimeSpan

The new value for InitialBackoff.

Returns
TypeDescription
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
NameDescription
maxBackoffTimeSpan

The new value for MaxBackoff.

Returns
TypeDescription
RetryTiming

A new instance based on the existing values, but with the specified max backoff.