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