/// <summary> /// Receives changes from peer nodes, merges remote with local gossip nodes, then publishes /// changes to the event stream for load balancing router consumption, and gossip back. /// </summary> private void ReceiveGossip(MetricsGossipEnvelope envelope) { // remote node might not have same view of member nodes, this side should only care // about nodes that are known here, otherwise removed nodes can come back var otherGossip = envelope.Gossip.Filter(Nodes); LatestGossip = LatestGossip.Merge(otherGossip); // changes will be published in the period collect task if (!envelope.Reply) { ReplyGossipTo(envelope.From); } }
private bool Equals(MetricsGossipEnvelope other) { return From.Equals(other.From) && Gossip.Equals(other.Gossip) && Reply.Equals(other.Reply); }
private void SendGossip(Address address, MetricsGossipEnvelope envelope) { Context.ActorSelection(Self.Path.ToStringWithAddress(address)).Tell(envelope); }
/// <summary> /// Receives changes from peer nodes, merges remote with local gossip nodes, then publishes /// changes to the event stream for load balancing router consumption, and gossip back. /// </summary> private void ReceiveGossip(MetricsGossipEnvelope envelope) { // remote node might not have same view of member nodes, this side should only care // about nodes that are known here, otherwise removed nodes can come back var otherGossip = envelope.Gossip.Filter(Nodes); LatestGossip = LatestGossip.Merge(otherGossip); // changes will be published in the period collect task if (!envelope.Reply) ReplyGossipTo(envelope.From); }
private bool Equals(MetricsGossipEnvelope other) { return(From.Equals(other.From) && Gossip.Equals(other.Gossip) && Reply.Equals(other.Reply)); }
private void SendGossip(Address address, MetricsGossipEnvelope envelope) { Context.ActorSelection(Self.Path.ToStringWithAddress(address)).Tell(envelope); }