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.
Namespace
GoogleCloudGoogle.Cloud.DiagnosticsCommonAssembly
Google.Cloud.Diagnostics.Common.dll
Fields
DefaultBufferSize
public static readonly int DefaultBufferSize
The default buffer size in bytes. 2^18 = 262144.
Field Value | |
---|---|
Type | Description |
int |
DefaultRetryAttempts
public static readonly int DefaultRetryAttempts
The default number of retry attempts.
Field Value | |
---|---|
Type | Description |
int |
DefaultRetryInterval
public static readonly TimeSpan DefaultRetryInterval
The 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 |
int |
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 |
int |
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 | ExceptionHandling Optional, how exceptions should be handled. Defaults to Ignore. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
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. |
bufferSizeBytes | int Optional, the size of the buffer to be used in bytes. Defaults to DefaultBufferSize. |
retryInterval | TimeSpan Optional, the time between retries. Default to DefaultRetryInterval. |
retryAttempts | int Optional, the number of retry attempts. Defaults to DefaultRetryAttempts. |
Returns | |
---|---|
Type | Description |
RetryOptions |