protected bool Equals(GossipStatus other) { return _from.Equals(other._from) && _version.IsSameAs(other._version); }
/// <inheritdoc/> protected bool Equals(GossipStatus other) { return(_from.Equals(other._from) && _version.IsSameAs(other._version)); }
public void ReceiveGossipStatus(GossipStatus status) { var from = status.From; if (!_latestGossip.Overview.Reachability.IsReachable(SelfUniqueAddress, from)) _log.Info("Ignoring received gossip status from unreachable [{0}]", from); else if (_latestGossip.Members.All(m => !m.UniqueAddress.Equals(from))) _log.Debug("Cluster Node [{0}] - Ignoring received gossip status from unknown [{1}]", _cluster.SelfAddress, from); else { var comparison = status.Version.CompareTo(_latestGossip.Version); switch (comparison) { case VectorClock.Ordering.Same: //same version break; case VectorClock.Ordering.After: GossipStatusTo(from, Sender); //remote is newer break; default: GossipTo(from, Sender); //conflicting or local is newer break; } } }