     end
   end
 end
+

    end
  end

  defp notify_up_set(set, set, old_up) do
    MapSet.new(old_up)
  end
  defp notify_up_set(old_set, merged_set, old_up) do
    new_up = MapSet.difference(MapSet.new(merged_set), MapSet.new(old_set))
    Enum.each(new_up, fn(n) -> Node.monitor(n, :true) end)

    MapSet.new(new_set)
  end

  defp notify_node_set(set, set, _), do: :nothingtodo
  defp notify_node_set(old_set, _, new_set) do
    GenEvent.notify(GenServerring.Events, {:new_node_set, get_set(old_set), get_set(new_set)})
      File.write!(ring_path, new_set |> :erlang.term_to_binary)
  end

  defp notify_payload(payload, payload, _), do: :nothingtodo
  defp notify_payload(_, _, ring) do
    ring.callback.handle_change(ring.payload)
  end
