class ODBA::ConnectionPool
Constants
- POOL_SIZE
- SETUP_RETRIES
Attributes
connections[R]
attr_reader :connections
dbi_args[R]
attr_reader :connections
Public Class Methods
new(*dbi_args)
click to toggle source
All connections are delegated to DBI. The constructor simply records the DBI-arguments and reuses them to setup connections when needed.
# File lib/odba/connection_pool.rb, line 17 def initialize(*dbi_args) @dbi_args = dbi_args @opts = @dbi_args.last.is_a?(Hash) ? @dbi_args.pop : Hash.new @connections = [] @mutex = Mutex.new connect end
Public Instance Methods
size()
click to toggle source
# File lib/odba/connection_pool.rb, line 54 def size @connections.size end
Also aliased as: pool_size