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

Attributes included from ExecutionError

#statement

Instance Attribute Details

#aliveInteger (readonly)

Returns the number of replicas available for the request.

Returns:

  • (Integer)

    the number of replicas available for the request



112
113
114
# File 'lib/cassandra/errors.rb', line 112

def alive
  @alive
end

#consistencySymbol (readonly)

Consistency level that triggered the error.

Returns:

  • (Symbol)

    the original consistency level for the request, one of CONSISTENCIES



105
106
107
# File 'lib/cassandra/errors.rb', line 105

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



109
110
111
# File 'lib/cassandra/errors.rb', line 109

def required
  @required
end