class Cassandra::Errors::UnavailableError

Raised when coordinator determines that a request cannot be executed because there are not enough replicas. In this scenario, the request is not sent to the nodes at all.

@note This error can be handled by a {Cassandra::Retry::Policy} to

determine the desired outcome.

@see github.com/apache/cassandra/blob/cassandra-2.0.16/doc/native_protocol_v1.spec#L662-L672 Description

of Unavailable Error in Apache Cassandra native protocol spec v1

Attributes

alive[R]

@return [Integer] the number of replicas available for the request

consistency[R]

Consistency level that triggered the error.

@return [Symbol] the original consistency level for the request, one of

{Cassandra::CONSISTENCIES}
required[R]

@return [Integer] the number of replicas required to achieve requested

consistency level

Public Class Methods

new(message, payload, warnings, keyspace, statement, options, hosts, r_consistency, retries, consistency, required, alive) click to toggle source

@private

Calls superclass method Cassandra::Errors::ExecutionError::new
    # File lib/cassandra/errors.rb
177 def initialize(message,
178                payload,
179                warnings,
180                keyspace,
181                statement,
182                options,
183                hosts,
184                r_consistency,
185                retries,
186                consistency,
187                required,
188                alive)
189   super(message,
190         payload,
191         warnings,
192         keyspace,
193         statement,
194         options,
195         hosts,
196         r_consistency,
197         retries)
198   @consistency = consistency
199   @required    = required
200   @alive       = alive
201 end