Class RetryOptions
Options that define retry logic for requests that failed.
Inheritance
Inherited Members
Namespace: Google.Cloud.Diagnostics.Common
Assembly: Google.Cloud.Diagnostics.Common.dll
Syntax
public sealed class RetryOptions
Fields
DefaultBufferSize
The default buffer size in bytes. 2^18 = 262144.
Declaration
public static readonly int DefaultBufferSize
Field Value
| Type | Description |
|---|---|
| System.Int32 |
DefaultRetryAttempts
The default number of retry attempts.
Declaration
public static readonly int DefaultRetryAttempts
Field Value
| Type | Description |
|---|---|
| System.Int32 |
DefaultRetryInterval
The default wait time between retries.
Declaration
public static readonly TimeSpan DefaultRetryInterval
Field Value
| Type | Description |
|---|---|
| System.TimeSpan |
Properties
BufferOverflow
How to handle a full buffer, only used for Retry.
Declaration
public BufferOverflow BufferOverflow { get; }
Property Value
| Type | Description |
|---|---|
| BufferOverflow |
BufferSizeBytes
The size of the buffer in bytes, only used for Retry.
Declaration
public int BufferSizeBytes { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
ExceptionHandling
How exceptions are handled.
Declaration
public ExceptionHandling ExceptionHandling { get; }
Property Value
| Type | Description |
|---|---|
| ExceptionHandling |
RetryAttempts
The number of attempts to retry sending information, only used for Retry.
Declaration
public int RetryAttempts { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
RetryInterval
The amount of time to wait between retries, only used for Retry.
Declaration
public TimeSpan RetryInterval { get; }
Property Value
| Type | Description |
|---|---|
| System.TimeSpan |
RetryType
The type of retry to make.
Declaration
public RetryType RetryType { get; }
Property Value
| Type | Description |
|---|---|
| RetryType |
Methods
NoRetry(ExceptionHandling)
Creates a RetryOptions for None.
Declaration
public static RetryOptions NoRetry(ExceptionHandling exceptionHandling = ExceptionHandling.Ignore)
Parameters
| Type | Name | Description |
|---|---|---|
| ExceptionHandling | exceptionHandling | Optional, how exceptions should be handled. Defaults to Ignore. |
Returns
| Type | Description |
|---|---|
| RetryOptions |
Retry(ExceptionHandling, BufferOverflow, Nullable<Int32>, Nullable<TimeSpan>, Nullable<Int32>)
Creates a RetryOptions for Retry.
Declaration
public static RetryOptions Retry(ExceptionHandling exceptionHandling = ExceptionHandling.Ignore, BufferOverflow bufferOverflow = BufferOverflow.IgnoreNewEntries, int? bufferSizeBytes = default(int? ), TimeSpan? retryInterval = default(TimeSpan? ), int? retryAttempts = default(int? ))
Parameters
| Type | Name | Description |
|---|---|---|
| ExceptionHandling | exceptionHandling | Optional, how exceptions should be handled. Defaults to Ignore. |
| BufferOverflow | bufferOverflow | Optional, how a buffer overflow should be handled. Defaults to IgnoreNewEntries. |
| System.Nullable<System.Int32> | bufferSizeBytes | Optional, the size of the buffer to be used in bytes. Defaults to DefaultBufferSize. |
| System.Nullable<System.TimeSpan> | retryInterval | Optional, the time between retries. Default to DefaultRetryInterval. |
| System.Nullable<System.Int32> | retryAttempts | Optional, the number of retry attempts. Defaults to DefaultRetryAttempts. |
Returns
| Type | Description |
|---|---|
| RetryOptions |