Class PollSettings (4.0.0)

public sealed class PollSettings

Settings controlling repeated polling, for example when waiting for a long-running operation to complete.

Inheritance

Object > PollSettings

Namespace

Google.Api.Gax

Assembly

Google.Api.Gax.dll

Constructors

PollSettings(Expiration, TimeSpan)

public PollSettings(Expiration expiration, TimeSpan delay)

Creates poll settings from the given expiration and constant delay.

Parameters
NameDescription
expirationExpiration

The expiration to use in order to know when to stop polling. Must not be null.

delayTimeSpan

The constant delay between RPC calls. Must be non-negative.

PollSettings(Expiration, TimeSpan, Double, TimeSpan)

public PollSettings(Expiration expiration, TimeSpan delay, double delayMultiplier, TimeSpan maxDelay)

Creates poll settings from the given expiration, delay, delay multiplier and maximum delay.

Parameters
NameDescription
expirationExpiration

The expiration to use in order to know when to stop polling. Must not be null.

delayTimeSpan

The delay between RPC calls. Must be non-negative.

delayMultiplierDouble

The multiplier to apply to the delay on each iteration; must be greater or equal to 1.0.

maxDelayTimeSpan

The maximum delay to use.

Properties

Delay

public TimeSpan Delay { get; }

The delay between RPC calls when fetching the operation status. This is never negative. There is no exponential backoff between calls; the same delay is used for each call.

Property Value
TypeDescription
TimeSpan
Remarks

This is the delay between the a successful RPC response being received and the next RPC request being sent.

DelayMultiplier

public double DelayMultiplier { get; }

The multiplier to apply to the delay on each iteration; must be greater or equal to 1.0.

Property Value
TypeDescription
Double

Expiration

public Expiration Expiration { get; }

How long to wait before giving up. This is never null.

Property Value
TypeDescription
Expiration

MaxDelay

public TimeSpan MaxDelay { get; }

The maximum delay to use. If the increasing delay due to the delay multiplier exceeds this, this maximum is used instead.

Property Value
TypeDescription
TimeSpan