Class WriteFailureException
Represents a server-side failure (non-timeout) during a write query.
Inheritance
Implements
Inherited Members
Namespace: Cassandra
Assembly: Cassandra.dll
Syntax
public class WriteFailureException : QueryExecutionException, ISerializable
Constructors
WriteFailureException(ConsistencyLevel, int, int, string, IDictionary<IPAddress, int>)
Creates a new instance of WriteFailureException providing the failure reasons dictionary.
Declaration
public WriteFailureException(ConsistencyLevel consistency, int received, int required, string writeType, IDictionary<IPAddress, int> reasons)
Parameters
Type | Name | Description |
---|---|---|
ConsistencyLevel | consistency | |
int | received | |
int | required | |
string | writeType | |
IDictionary<IPAddress, int> | reasons |
WriteFailureException(ConsistencyLevel, int, int, string, int)
Creates a new instance of WriteFailureException.
Declaration
public WriteFailureException(ConsistencyLevel consistency, int received, int required, string writeType, int failures)
Parameters
Type | Name | Description |
---|---|---|
ConsistencyLevel | consistency | |
int | received | |
int | required | |
string | writeType | |
int | failures |
Properties
ConsistencyLevel
Gets the consistency level of the operation
Declaration
public ConsistencyLevel ConsistencyLevel { get; }
Property Value
Type | Description |
---|---|
ConsistencyLevel |
Failures
Gets the number of nodes that experienced a failure while executing the request.
Declaration
public int Failures { get; }
Property Value
Type | Description |
---|---|
int |
Reasons
Gets a failure reason code for each node that failed.
On older protocol versions, an empty map and only the number of Failures is provided.
Declaration
public IDictionary<IPAddress, int> Reasons { get; }
Property Value
Type | Description |
---|---|
IDictionary<IPAddress, int> |
ReceivedAcknowledgements
Gets the number of replica that had acknowledged/responded to the operation
Declaration
public int ReceivedAcknowledgements { get; }
Property Value
Type | Description |
---|---|
int |
RequiredAcknowledgements
Gets the minimum number of replica acknowledgements/responses that were required to fulfill the operation.
Declaration
public int RequiredAcknowledgements { get; }
Property Value
Type | Description |
---|---|
int |
WriteType
Gets the type of write operation that timed out.
Possible values: SIMPLE, BATCH, BATCH_LOG, UNLOGGED_BATCH and COUNTER.
Declaration
public string WriteType { get; }
Property Value
Type | Description |
---|---|
string |