Module: Aerospike::Cluster::FindNode

Defined in:
lib/aerospike/cluster/find_node.rb

Overview

Find node in cluster by name

Class Method Summary collapse

Class Method Details

.call(cluster, peers, node_name) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/aerospike/cluster/find_node.rb', line 25

def call(cluster, peers, node_name)
  node = cluster.find_node_by_name(node_name) || peers.find_node_by_name(node_name)
  return if node.nil?
  node.tap do |n|
    n.increase_reference_count!
  end
end