Exception: Cassandra::Errors::UnavailableError

Inherits:
StandardError
  • Object
show all
Includes:
ExecutionError
Defined in:
lib/cassandra/errors.rb

Overview

Note:

This error can be handled by a Retry::Policy to determine the desired outcome.

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.

Instance Attribute Summary collapse

Method Summary

Methods included from ExecutionError

#execution_info

Instance Attribute Details

#aliveInteger (readonly)

Returns the number of replicas available for the request.

Returns:

  • (Integer)

    the number of replicas available for the request



174
175
176
# File 'lib/cassandra/errors.rb', line 174

def alive
  @alive
end

#consistencySymbol (readonly)

Consistency level that triggered the error.

Returns:

  • (Symbol)

    the original consistency level for the request, one of CONSISTENCIES



167
168
169
# File 'lib/cassandra/errors.rb', line 167

def consistency
  @consistency
end

#requiredInteger (readonly)

Returns the number of replicas required to achieve requested consistency level.

Returns:

  • (Integer)

    the number of replicas required to achieve requested consistency level



171
172
173
# File 'lib/cassandra/errors.rb', line 171

def required
  @required
end