Method: Dalli::Ring#initialize
- Defined in:
- lib/dalli/ring.rb
#initialize(servers_arg, protocol_implementation, options) ⇒ Ring
Returns a new instance of Ring.
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/dalli/ring.rb', line 26 def initialize(servers_arg, protocol_implementation, ) @servers = servers_arg.map do |s| protocol_implementation.new(s, ) end @continuum = nil @continuum = build_continuum(servers) if servers.size > 1 threadsafe! unless [:threadsafe] == false @failover = [:failover] != false end |