Class: Rooq::ConnectionPool
- Inherits:
-
Object
- Object
- Rooq::ConnectionPool
- Defined in:
- lib/rooq/connection.rb
Overview
Abstract interface for connection pools. Implementations manage a pool of reusable database connections.
Direct Known Subclasses
Instance Method Summary collapse
-
#available ⇒ Integer
Number of available connections.
-
#checkin(connection) ⇒ Object
Check in a connection back to the pool.
-
#checkout ⇒ Object
Check out a connection from the pool.
-
#shutdown ⇒ Object
Shutdown the pool and close all connections.
-
#size ⇒ Integer
Total pool size.
Instance Method Details
#available ⇒ Integer
Returns number of available connections.
122 123 124 |
# File 'lib/rooq/connection.rb', line 122 def available raise NotImplementedError, "#{self.class} must implement #available" end |
#checkin(connection) ⇒ Object
Check in a connection back to the pool.
112 113 114 |
# File 'lib/rooq/connection.rb', line 112 def checkin(connection) raise NotImplementedError, "#{self.class} must implement #checkin" end |
#checkout ⇒ Object
Check out a connection from the pool.
106 107 108 |
# File 'lib/rooq/connection.rb', line 106 def checkout raise NotImplementedError, "#{self.class} must implement #checkout" end |
#shutdown ⇒ Object
Shutdown the pool and close all connections.
127 128 129 |
# File 'lib/rooq/connection.rb', line 127 def shutdown raise NotImplementedError, "#{self.class} must implement #shutdown" end |
#size ⇒ Integer
Returns total pool size.
117 118 119 |
# File 'lib/rooq/connection.rb', line 117 def size raise NotImplementedError, "#{self.class} must implement #size" end |