Class ActiveRecord::ConnectionAdapters::SeamlessDatabasePoolAdapter
In: lib/active_record/connection_adapters/seamless_database_pool_adapter.rb
Parent: AbstractAdapter

Methods

Classes and Modules

Class ActiveRecord::ConnectionAdapters::SeamlessDatabasePoolAdapter::AvailableConnections
Class ActiveRecord::ConnectionAdapters::SeamlessDatabasePoolAdapter::DatabaseConnectionError

Attributes

master_connection  [R] 
read_connections  [R] 

Public Class methods

Create an anonymous class that extends this one and proxies methods to the pool connections.

Set the arel visitor on the connections.

Public Instance methods

Returns an array of the master connection and the read pool connections

Get the available weighted connections. When a connection is dead and cannot be reconnected, it will be temporarily removed from the read pool so we don‘t keep trying to reconnect to a database that isn‘t listening.

Get the current read connection

Get the pool weight of a connection

Get a random read connection from the pool. If the connection is not active, it will attempt to reconnect to the database. If that fails, it will be removed from the pool for one minute.

Temporarily remove a connection from the read pool.

Force using the master connection in a block.

[Validate]