Google.Cloud.Diagnostics.Common - Class RetryOptions (5.1.0)

public sealed class RetryOptions

Reference documentation and code samples for the Google.Cloud.Diagnostics.Common class RetryOptions.

Options that define retry logic for requests that failed.

Inheritance

object > RetryOptions

Namespace

GoogleCloudGoogle.Cloud.DiagnosticsCommon

Assembly

Google.Cloud.Diagnostics.Common.dll

Fields

DefaultBufferSize

public static readonly int DefaultBufferSize

The default buffer size in bytes. 2^18 = 262144.

Field Value
TypeDescription
int

DefaultRetryAttempts

public static readonly int DefaultRetryAttempts

The default number of retry attempts.

Field Value
TypeDescription
int

DefaultRetryInterval

public static readonly TimeSpan DefaultRetryInterval

The default wait time between retries.

Field Value
TypeDescription
TimeSpan

Properties

BufferOverflow

public BufferOverflow BufferOverflow { get; }

How to handle a full buffer, only used for Retry.

Property Value
TypeDescription
BufferOverflow

BufferSizeBytes

public int BufferSizeBytes { get; }

The size of the buffer in bytes, only used for Retry.

Property Value
TypeDescription
int

ExceptionHandling

public ExceptionHandling ExceptionHandling { get; }

How exceptions are handled.

Property Value
TypeDescription
ExceptionHandling

RetryAttempts

public int RetryAttempts { get; }

The number of attempts to retry sending information, only used for Retry.

Property Value
TypeDescription
int

RetryInterval

public TimeSpan RetryInterval { get; }

The amount of time to wait between retries, only used for Retry.

Property Value
TypeDescription
TimeSpan

RetryType

public RetryType RetryType { get; }

The type of retry to make.

Property Value
TypeDescription
RetryType

Methods

NoRetry(ExceptionHandling)

public static RetryOptions NoRetry(ExceptionHandling exceptionHandling = ExceptionHandling.Ignore)

Creates a RetryOptions for None.

Parameter
NameDescription
exceptionHandlingExceptionHandling

Optional, how exceptions should be handled. Defaults to Ignore.

Returns
TypeDescription
RetryOptions

Retry(ExceptionHandling, BufferOverflow, int?, TimeSpan?, int?)

public static RetryOptions Retry(ExceptionHandling exceptionHandling = ExceptionHandling.Ignore, BufferOverflow bufferOverflow = BufferOverflow.IgnoreNewEntries, int? bufferSizeBytes = null, TimeSpan? retryInterval = null, int? retryAttempts = null)

Creates a RetryOptions for Retry.

Parameters
NameDescription
exceptionHandlingExceptionHandling

Optional, how exceptions should be handled. Defaults to Ignore.

bufferOverflowBufferOverflow

Optional, how a buffer overflow should be handled. Defaults to IgnoreNewEntries.

bufferSizeBytesint

Optional, the size of the buffer to be used in bytes. Defaults to DefaultBufferSize.

retryIntervalTimeSpan

Optional, the time between retries. Default to DefaultRetryInterval.

retryAttemptsint

Optional, the number of retry attempts. Defaults to DefaultRetryAttempts.

Returns
TypeDescription
RetryOptions