Module Moped::Failover
In: lib/moped/failover.rb
lib/moped/failover/reconfigure.rb
lib/moped/failover/retry.rb
lib/moped/failover/ignore.rb
lib/moped/failover/disconnect.rb

Provides behaviour around failover scenarios for different types of exceptions that get raised on connection and execution of operations.

@since 2.0.0

Methods

get  

Classes and Modules

Module Moped::Failover::Disconnect
Module Moped::Failover::Ignore
Module Moped::Failover::Reconfigure
Module Moped::Failover::Retry

Constants

STRATEGIES = { Errors::AuthenticationFailure => Ignore, Errors::ConnectionFailure => Retry, Errors::CursorNotFound => Ignore, Errors::OperationFailure => Reconfigure, Errors::QueryFailure => Reconfigure, Errors::PoolTimeout => Retry   Hash lookup for the failover classes based off the exception type.

@since 2.0.0

Public Instance methods

Get the appropriate failover handler given the provided exception.

@example Get the failover handler for an IOError.

  Moped::Failover.get(IOError)

@param [ Exception ] exception The raised exception.

@return [ Object ] The failover handler.

@since 2.0.0

[Validate]