lib/oedipus/connection/pool.rb
# Initialize a new connection pool with the given options.
#
# @param [Hash] options
#   configuration for the pool
#
# @option [String] host
#   the host to use when allocating new connections
#
# @option [Fixnum] port
#   the port to use when allocating new connections
#
# @option [Fixnum] size
#   the maximum number of connections (defaults to 8)
#
# @option [Fixnum] ttl
#   the length of time for which any given connection should live
Initialize a new connection pool with the given options.
Initialize a new connection pool with the given options .
def new_instance
        Oedipus::Mysql.new(@host, @port).tap do |instance|
          @used[instance]     = instance
          @expiries[instance] = Time.now + @ttl
        end
      end
def new_instance Oedipus :: Mysql . new ( @host , @port ) . tap do | instance | @used [ instance ] = instance @expiries [ instance ] = Time . now + @ttl end end
Initialize a new connection pool with the given options.
Initialize a new connection pool with the given options .
<not_specific>
ttl the length of time for which any given connection should live
ttl the length of time for which any given connection should live