Class IdempotenceAwareRetryPolicy
A retry policy that avoids retrying non-idempotent statements.
In case of write timeouts this policy will always return Rethrow() if the statement is considered non-idempotent (see IsIdempotent). For all other cases, this policy delegates the decision to the child policy.
Inheritance
System.Object
IdempotenceAwareRetryPolicy
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Dse
Assembly: Dse.dll
Syntax
public class IdempotenceAwareRetryPolicy : IExtendedRetryPolicy, IRetryPolicy
Constructors
IdempotenceAwareRetryPolicy(IRetryPolicy)
Creates a new instance of IdempotenceAwareRetryPolicy.
Declaration
public IdempotenceAwareRetryPolicy(IRetryPolicy childPolicy)
Parameters
Type | Name | Description |
---|---|---|
IRetryPolicy | childPolicy | The retry policy to wrap. |
Properties
ChildPolicy
Declaration
public IRetryPolicy ChildPolicy { get; }
Property Value
Type | Description |
---|---|
IRetryPolicy |
Methods
OnReadTimeout(IStatement, ConsistencyLevel, Int32, Int32, Boolean, Int32)
Declaration
public RetryDecision OnReadTimeout(IStatement stmt, ConsistencyLevel cl, int requiredResponses, int receivedResponses, bool dataRetrieved, int nbRetry)
Parameters
Type | Name | Description |
---|---|---|
IStatement | stmt | |
ConsistencyLevel | cl | |
System.Int32 | requiredResponses | |
System.Int32 | receivedResponses | |
System.Boolean | dataRetrieved | |
System.Int32 | nbRetry |
Returns
Type | Description |
---|---|
RetryDecision |
OnRequestError(IStatement, Configuration, Exception, Int32)
Declaration
public RetryDecision OnRequestError(IStatement stmt, Configuration config, Exception ex, int nbRetry)
Parameters
Type | Name | Description |
---|---|---|
IStatement | stmt | |
Configuration | config | |
System.Exception | ex | |
System.Int32 | nbRetry |
Returns
Type | Description |
---|---|
RetryDecision |
OnUnavailable(IStatement, ConsistencyLevel, Int32, Int32, Int32)
Declaration
public RetryDecision OnUnavailable(IStatement stmt, ConsistencyLevel cl, int requiredReplica, int aliveReplica, int nbRetry)
Parameters
Type | Name | Description |
---|---|---|
IStatement | stmt | |
ConsistencyLevel | cl | |
System.Int32 | requiredReplica | |
System.Int32 | aliveReplica | |
System.Int32 | nbRetry |
Returns
Type | Description |
---|---|
RetryDecision |
OnWriteTimeout(IStatement, ConsistencyLevel, String, Int32, Int32, Int32)
Declaration
public RetryDecision OnWriteTimeout(IStatement stmt, ConsistencyLevel cl, string writeType, int requiredAcks, int receivedAcks, int nbRetry)
Parameters
Type | Name | Description |
---|---|---|
IStatement | stmt | |
ConsistencyLevel | cl | |
System.String | writeType | |
System.Int32 | requiredAcks | |
System.Int32 | receivedAcks | |
System.Int32 | nbRetry |
Returns
Type | Description |
---|---|
RetryDecision |