Class FallthroughRetryPolicy
A retry policy that never retry (nor ignore).
All of the methods of this retry policy unconditionally return Rethrow(). If this policy is used, retry will have to be implemented in business code.
Inheritance
Inherited Members
Namespace: Cassandra
Assembly: Cassandra.dll
Syntax
public class FallthroughRetryPolicy : IExtendedRetryPolicy, IRetryPolicy
Fields
Instance
Declaration
public static readonly FallthroughRetryPolicy Instance
Field Value
Type | Description |
---|---|
FallthroughRetryPolicy |
Methods
OnReadTimeout(IStatement, ConsistencyLevel, int, int, bool, int)
Defines whether to retry and at which consistency level on a read timeout.
Declaration
public RetryDecision OnReadTimeout(IStatement query, ConsistencyLevel cl, int requiredResponses, int receivedResponses, bool dataRetrieved, int nbRetry)
Parameters
Type | Name | Description |
---|---|---|
IStatement | query | the original query that timeouted. |
ConsistencyLevel | cl | the original consistency level of the read that timeouted. |
int | requiredResponses | the number of responses that were required to achieve the requested consistency level. |
int | receivedResponses | the number of responses that had been received by the time the timeout exception was raised. |
bool | dataRetrieved | whether actual data (by opposition to data checksum) was present in the received responses. |
int | nbRetry | the number of retry already performed for this operation. |
Returns
Type | Description |
---|---|
RetryDecision |
|
OnRequestError(IStatement, Configuration, Exception, int)
Defines whether to retry and at which consistency level on an unexpected error.
This method might be invoked in the following situations:
- On a client timeout, while waiting for the server response (see ReadTimeoutMillis).
- On a socket error (socket closed, etc.).
- When the contacted host replies with an
OVERLOADED
error or aSERVER_ERROR
.
Note that when such an error occurs, there is no guarantee that the mutation has been applied server-side or not.
Declaration
public RetryDecision OnRequestError(IStatement statement, Configuration config, Exception ex, int nbRetry)
Parameters
Type | Name | Description |
---|---|---|
IStatement | statement | The original query that failed. |
Configuration | config | The current cluster configuration. |
Exception | ex | The exception that caused this request to fail. |
int | nbRetry | The number of retries already performed for this operation. |
Returns
Type | Description |
---|---|
RetryDecision |
OnUnavailable(IStatement, ConsistencyLevel, int, int, int)
Defines whether to retry and at which consistency level on an unavailable exception.
Declaration
public RetryDecision OnUnavailable(IStatement query, ConsistencyLevel cl, int requiredReplica, int aliveReplica, int nbRetry)
Parameters
Type | Name | Description |
---|---|---|
IStatement | query | the original query for which the consistency level cannot be achieved. |
ConsistencyLevel | cl | the original consistency level for the operation. |
int | requiredReplica | the number of replica that should have been (known) alive for the operation to be attempted. |
int | aliveReplica | the number of replica that were know to be alive by the coordinator of the operation. |
int | nbRetry | the number of retry already performed for this operation. |
Returns
Type | Description |
---|---|
RetryDecision |
|
OnWriteTimeout(IStatement, ConsistencyLevel, string, int, int, int)
Defines whether to retry and at which consistency level on a write timeout.
Declaration
public RetryDecision OnWriteTimeout(IStatement query, ConsistencyLevel cl, string writeType, int requiredAcks, int receivedAcks, int nbRetry)
Parameters
Type | Name | Description |
---|---|---|
IStatement | query | the original query that timeouted. |
ConsistencyLevel | cl | the original consistency level of the write that timeouted. |
string | writeType | the type of the write that timeouted. |
int | requiredAcks | the number of acknowledgments that were required to achieve the requested consistency level. |
int | receivedAcks | the number of acknowledgments that had been received by the time the timeout exception was raised. |
int | nbRetry | the number of retry already performed for this operation. |
Returns
Type | Description |
---|---|
RetryDecision |
|