active_connections?

active_connections?() Instance Public methods Returns true if there are any active connections among the connection pools that the ConnectionHandler is managing.

clear_active_connections!

clear_active_connections!() Instance Public methods Returns any connections in use by the current thread back to the pool, and also returns connections to the pool cached by threads that are no longer alive.

clear_all_connections!

clear_all_connections!() Instance Public methods

clear_reloadable_connections!

clear_reloadable_connections!() Instance Public methods Clears the cache which maps classes.

connected?

connected?(klass) Instance Public methods Returns true if a connection that's accessible to this class has already been opened.

connection_pool_list

connection_pool_list() Instance Public methods

connection_pools

connection_pools() Instance Public methods

establish_connection

establish_connection(owner, spec) Instance Public methods

remove_connection

remove_connection(owner) Instance Public methods Remove the connection for this class. This will close the active connection and the defined connection (if they exist). The result can be used as an argument for #establish_connection, for easily re-establishing the connection.

retrieve_connection_pool

retrieve_connection_pool(klass) Instance Public methods Retrieving the connection pool happens a lot so we cache it in @class_to_pool. This makes retrieving the connection pool O(1) once the process is warm. When a connection is established or removed, we invalidate the cache. Ideally we would use fetch here, as class_to_pool may sometimes be nil. However, benchmarking (gist.github.com/jonleighton/3552829) showed that fetch is significantly slower than []. So in the nil case, no ca