Class: Db2Query::Connection::Pool
- Inherits:
-
ConnectionPool
- Object
- ConnectionPool
- Db2Query::Connection::Pool
- Defined in:
- lib/db2_query/db_connection.rb
Instance Method Summary collapse
- #current_state ⇒ Object
- #disconnect! ⇒ Object
-
#initialize(config, &block) ⇒ Pool
constructor
A new instance of Pool.
- #reload ⇒ Object
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_state ⇒ Object
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 |
#reload ⇒ Object
33 34 35 |
# File 'lib/db2_query/db_connection.rb', line 33 def reload super { |client| client.disconnect! } end |