Class: ActiveRecord::ConnectionAdapters::PoolManager
- Defined in:
- activerecord/lib/active_record/connection_adapters/pool_manager.rb
Overview
:nodoc:
Instance Method Summary collapse
- #get_pool_config(key) ⇒ Object
-
#initialize ⇒ PoolManager
constructor
A new instance of PoolManager.
- #pool_configs ⇒ Object
- #remove_pool_config(key) ⇒ Object
- #set_pool_config(key, pool_config) ⇒ Object
Constructor Details
#initialize ⇒ PoolManager
Returns a new instance of PoolManager.
6 7 8 |
# File 'activerecord/lib/active_record/connection_adapters/pool_manager.rb', line 6 def initialize @name_to_pool_config = {} end |
Instance Method Details
#get_pool_config(key) ⇒ Object
18 19 20 |
# File 'activerecord/lib/active_record/connection_adapters/pool_manager.rb', line 18 def get_pool_config(key) @name_to_pool_config[key] end |
#pool_configs ⇒ Object
10 11 12 |
# File 'activerecord/lib/active_record/connection_adapters/pool_manager.rb', line 10 def pool_configs @name_to_pool_config.values end |
#remove_pool_config(key) ⇒ Object
14 15 16 |
# File 'activerecord/lib/active_record/connection_adapters/pool_manager.rb', line 14 def remove_pool_config(key) @name_to_pool_config.delete(key) end |
#set_pool_config(key, pool_config) ⇒ Object
22 23 24 |
# File 'activerecord/lib/active_record/connection_adapters/pool_manager.rb', line 22 def set_pool_config(key, pool_config) @name_to_pool_config[key] = pool_config end |