Class LoggingRetryPolicy
A retry policy that wraps another policy, logging the decision made by its sub-policy.
Note that this policy only log the Ignore and Retry decisions (since Rethrow
decisions just amount to propagate the cassandra exception). The logging is done at the Info level.
Inheritance
System.Object
LoggingRetryPolicy
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 LoggingRetryPolicy : IExtendedRetryPolicy, IRetryPolicy
Constructors
LoggingRetryPolicy(IRetryPolicy)
Creates a new IExtendedRetryPolicy that logs the decision of the provided policy.
Declaration
public LoggingRetryPolicy(IRetryPolicy policy)
Parameters
| Type | Name | Description |
|---|---|---|
| IRetryPolicy | policy | the policy to wrap. The policy created by this
constructor will return the same decision than |
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 query, ConsistencyLevel cl, int requiredResponses, int receivedResponses, bool dataRetrieved, int nbRetry)
Parameters
| Type | Name | Description |
|---|---|---|
| IStatement | query | |
| 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 statement, Configuration config, Exception ex, int nbRetry)
Parameters
| Type | Name | Description |
|---|---|---|
| IStatement | statement | |
| Configuration | config | |
| System.Exception | ex | |
| System.Int32 | nbRetry |
Returns
| Type | Description |
|---|---|
| RetryDecision |
OnUnavailable(IStatement, ConsistencyLevel, Int32, Int32, Int32)
Declaration
public RetryDecision OnUnavailable(IStatement query, ConsistencyLevel cl, int requiredReplica, int aliveReplica, int nbRetry)
Parameters
| Type | Name | Description |
|---|---|---|
| IStatement | query | |
| 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 query, ConsistencyLevel cl, string writeType, int requiredAcks, int receivedAcks, int nbRetry)
Parameters
| Type | Name | Description |
|---|---|---|
| IStatement | query | |
| ConsistencyLevel | cl | |
| System.String | writeType | |
| System.Int32 | requiredAcks | |
| System.Int32 | receivedAcks | |
| System.Int32 | nbRetry |
Returns
| Type | Description |
|---|---|
| RetryDecision |