Class: ActiveRecord::ConnectionAdapters::PoolManager

Inherits:
Object
  • Object
show all
Defined in:
activerecord/lib/active_record/connection_adapters/pool_manager.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializePoolManager

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_configsObject



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