Class: Db2Query::Connection::Pool

Inherits:
ConnectionPool
  • Object
show all
Defined in:
lib/db2_query/db_connection.rb

Instance Method Summary collapse

Constructor Details

#initialize(config, &block) ⇒ Pool

Returns a new instance of Pool.



21
22
23
# File 'lib/db2_query/db_connection.rb', line 21

def initialize(config, &block)
  super(config, &block)
end

Instance Method Details

#current_stateObject



25
26
27
# File 'lib/db2_query/db_connection.rb', line 25

def current_state
  { size: self.size, available: self.available }
end

#disconnect!Object



29
30
31
# File 'lib/db2_query/db_connection.rb', line 29

def disconnect!
  shutdown { |client| client.disconnect! }
end

#reloadObject



33
34
35
# File 'lib/db2_query/db_connection.rb', line 33

def reload
  super { |client| client.disconnect! }
end