Class RetryPolicy
How retries ought to be handled, usable by both workflows and activities
Implements
Google.Protobuf.IBufferMessage
Assembly: Temporalio.dll
Syntax
public sealed class RetryPolicy : Google.Protobuf.IMessage<RetryPolicy>, Google.Protobuf.IBufferMessage
Constructors
RetryPolicy()
Declaration
RetryPolicy(RetryPolicy)
Declaration
public RetryPolicy(RetryPolicy other)
Parameters
Fields
BackoffCoefficientFieldNumber
Field number for the "backoff_coefficient" field.
Declaration
public const int BackoffCoefficientFieldNumber = null
Field Value
InitialIntervalFieldNumber
Field number for the "initial_interval" field.
Declaration
public const int InitialIntervalFieldNumber = null
Field Value
MaximumAttemptsFieldNumber
Field number for the "maximum_attempts" field.
Declaration
public const int MaximumAttemptsFieldNumber = null
Field Value
MaximumIntervalFieldNumber
Field number for the "maximum_interval" field.
Declaration
public const int MaximumIntervalFieldNumber = null
Field Value
NonRetryableErrorTypesFieldNumber
Field number for the "non_retryable_error_types" field.
Declaration
public const int NonRetryableErrorTypesFieldNumber = null
Field Value
Properties
BackoffCoefficient
Coefficient used to calculate the next retry interval.
The next retry interval is previous interval multiplied by the coefficient.
Must be 1 or larger.
Declaration
public double BackoffCoefficient { get; set; }
Property Value
Descriptor
Declaration
public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; }
Property Value
Type |
Description |
Google.Protobuf.Reflection.MessageDescriptor |
|
InitialInterval
Interval of the first retry. If retryBackoffCoefficient is 1.0 then it is used for all retries.
Declaration
public Google.Protobuf.WellKnownTypes.Duration InitialInterval { get; set; }
Property Value
Type |
Description |
Google.Protobuf.WellKnownTypes.Duration |
|
MaximumAttempts
Maximum number of attempts. When exceeded the retries stop even if not expired yet.
1 disables retries. 0 means unlimited (up to the timeouts)
Declaration
public int MaximumAttempts { get; set; }
Property Value
MaximumInterval
Maximum interval between retries. Exponential backoff leads to interval increase.
This value is the cap of the increase. Default is 100x of the initial interval.
Declaration
public Google.Protobuf.WellKnownTypes.Duration MaximumInterval { get; set; }
Property Value
Type |
Description |
Google.Protobuf.WellKnownTypes.Duration |
|
NonRetryableErrorTypes
Non-Retryable errors types. Will stop retrying if the error type matches this list. Note that
this is not a substring match, the error type (not message) must match exactly.
Declaration
public Google.Protobuf.Collections.RepeatedField<string> NonRetryableErrorTypes { get; }
Property Value
Type |
Description |
Google.Protobuf.Collections.RepeatedField<String> |
|
Parser
Declaration
public static Google.Protobuf.MessageParser<RetryPolicy> Parser { get; }
Property Value
Type |
Description |
Google.Protobuf.MessageParser<RetryPolicy> |
|
Methods
CalculateSize()
Declaration
public int CalculateSize()
Returns
Clone()
Declaration
public RetryPolicy Clone()
Returns
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
Object |
other |
|
Returns
Equals(RetryPolicy)
Declaration
public bool Equals(RetryPolicy other)
Parameters
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Declaration
public void MergeFrom(Google.Protobuf.CodedInputStream input)
Parameters
Type |
Name |
Description |
Google.Protobuf.CodedInputStream |
input |
|
MergeFrom(RetryPolicy)
Declaration
public void MergeFrom(RetryPolicy other)
Parameters
ToString()
Declaration
public override string ToString()
Returns
WriteTo(Google.Protobuf.CodedOutputStream)
Declaration
public void WriteTo(Google.Protobuf.CodedOutputStream output)
Parameters
Type |
Name |
Description |
Google.Protobuf.CodedOutputStream |
output |
|
Implements
Google.Protobuf.IBufferMessage