Navigation Menu

Skip to content

Commit

Permalink
Cache collected node names
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jan 6, 2015
1 parent afcef8e commit 236a1c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/droonga/cluster.rb
Expand Up @@ -91,25 +91,25 @@ def all_nodes
end

def dead_nodes
engine_nodes.select do |node|
@dead_nodes ||= engine_nodes.select do |node|
node.dead?
end.collect(&:name)
end

def service_provider_nodes
engine_nodes.select do |node|
@service_provider_nodes ||= engine_nodes.select do |node|
node.service_provider?
end.collect(&:name)
end

def absorb_source_nodes
engine_nodes.select do |node|
@absorb_source_nodes ||= engine_nodes.select do |node|
node.absorb_source?
end.collect(&:name)
end

def absorb_destination_nodes
engine_nodes.select do |node|
@absorb_destination_nodes ||= engine_nodes.select do |node|
node.absorb_destination?
end.collect(&:name)
end
Expand Down

0 comments on commit 236a1c2

Please sign in to comment.