Class: Redis::DistributedMarshaled
- Inherits:
-
Distributed
- Object
- DistRedis
- Distributed
- Redis::DistributedMarshaled
- Defined in:
- lib/redis/distributed_marshaled.rb
Instance Attribute Summary collapse
-
#ring ⇒ Object
readonly
Returns the value of attribute ring.
Instance Method Summary collapse
-
#initialize(addresses) ⇒ DistributedMarshaled
constructor
A new instance of DistributedMarshaled.
- #nodes ⇒ Object
Constructor Details
#initialize(addresses) ⇒ DistributedMarshaled
Returns a new instance of DistributedMarshaled.
5 6 7 8 9 10 |
# File 'lib/redis/distributed_marshaled.rb', line 5 def initialize(addresses) nodes = addresses.map do |address| MarshaledClient.new address end @ring = Redis::HashRing.new nodes end |
Instance Attribute Details
#ring ⇒ Object (readonly)
Returns the value of attribute ring.
3 4 5 |
# File 'lib/redis/distributed_marshaled.rb', line 3 def ring @ring end |
Instance Method Details
#nodes ⇒ Object
12 13 14 |
# File 'lib/redis/distributed_marshaled.rb', line 12 def nodes ring.nodes end |