Show / Hide Table of Contents

Class PollSettings

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

Inheritance
System.Object
PollSettings
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api.Gax
Assembly: Google.Api.Gax.dll
Syntax
public sealed class PollSettings

Constructors

PollSettings(Expiration, TimeSpan)

Creates poll settings from the given expiration and constant delay.

Declaration
public PollSettings(Expiration expiration, TimeSpan delay)
Parameters
Type Name Description
Expiration expiration

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

System.TimeSpan delay

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

PollSettings(Expiration, TimeSpan, Double, TimeSpan)

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

Declaration
public PollSettings(Expiration expiration, TimeSpan delay, double delayMultiplier, TimeSpan maxDelay)
Parameters
Type Name Description
Expiration expiration

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

System.TimeSpan delay

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

System.Double delayMultiplier

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

System.TimeSpan maxDelay

The maximum delay to use.

Properties

Delay

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.

Declaration
public TimeSpan Delay { get; }
Property Value
Type Description
System.TimeSpan
Remarks

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

DelayMultiplier

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

Declaration
public double DelayMultiplier { get; }
Property Value
Type Description
System.Double

Expiration

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

Declaration
public Expiration Expiration { get; }
Property Value
Type Description
Expiration

MaxDelay

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

Declaration
public TimeSpan MaxDelay { get; }
Property Value
Type Description
System.TimeSpan
Back to top