Method: Authorize::Redis::ConnectionManager#initialize
- Defined in:
- lib/authorize/redis/connection_manager.rb
#initialize(specification, options = {}) ⇒ ConnectionManager
Creates a new ConnectionPool object. specification is a ConnectionSpecification object which describes database connection parameters
21 22 23 24 25 26 |
# File 'lib/authorize/redis/connection_manager.rb', line 21 def initialize(specification, = {}) @options = {:size => 5}.merge() @pool = ResourcePool.new(@options[:size], lambda {specification.connect!}) @connection_map = {} # Connections mapped to threads @mutex = Monitor.new end |