Click or drag to resize

DowngradingConsistencyRetryPolicy Methods

The DowngradingConsistencyRetryPolicy type exposes the following members.

Methods
  NameDescription
Public methodOnReadTimeout
Defines whether to retry and at which consistency level on a read timeout.

This method triggers a maximum of one retry. If less replica responsed than required by the consistency level (but at least one replica did respond), the operation is retried at a lower consistency level. If enough replica responded but data was not retrieve, the operation is retried with the initial consistency level. Otherwise, an exception is thrown.

Public methodOnUnavailable
Defines whether to retry and at which consistency level on an unavailable exception.

This method triggers a maximum of one retry. If at least one replica is know to be alive, the operation is retried at a lower consistency level.

Public methodOnWriteTimeout
Defines whether to retry and at which consistency level on a write timeout.

This method triggers a maximum of one retry. If writeType == WriteType.BATCH_LOG, the write is retried with the initial consistency level. If writeType == WriteType.UNLOGGED_BATCH and at least one replica acknowleged, the write is retried with a lower consistency level (with unlogged batch, a write timeout can always mean that part of the batch haven't been persisted at' all, even if receivedAcks > 0). For other writeType, if we know the write has been persisted on at least one replica, we ignore the exception. Otherwise, an exception is thrown.

Top
See Also