Class: Redis::Pooled

Inherits:
Object
  • Object
show all
Includes:
Pools::Pooled
Defined in:
lib/redis/pooled.rb

Direct Known Subclasses

PooledStore

Instance Attribute Summary

Attributes included from Pools::Pooled

#connection_pool, #preparation_chain

Instance Method Summary collapse

Methods included from Pools::Pooled

#__prepare, #with_connection

Constructor Details

#initialize(options = {}) ⇒ Pooled

Returns a new instance of Pooled.



8
9
10
11
# File 'lib/redis/pooled.rb', line 8

def initialize(options = {})
  @redis_options = options
  super
end

Instance Method Details

#__connectionObject



13
14
15
# File 'lib/redis/pooled.rb', line 13

def __connection
  Redis.connect(@redis_options)
end

#__disconnect(client) ⇒ Object



17
18
19
# File 'lib/redis/pooled.rb', line 17

def __disconnect(client)
  client.quit if client
end