Method: Redis::HashRing#get_node

Defined in:
lib/redis/hash_ring.rb

#get_node(key) ⇒ Object

get the node in the hash ring for this key



46
47
48
49
50
# File 'lib/redis/hash_ring.rb', line 46

def get_node(key)
  hash = hash_for(key)
  idx = binary_search(@sorted_keys, hash)
  @ring[@sorted_keys[idx]]
end