/// <summary> /// TBD /// </summary> /// <param name="ring">TBD</param> /// <param name="oldReceiversNowUnreachable">TBD</param> /// <param name="failureDetector">TBD</param> public ClusterHeartbeatSenderState(HeartbeatNodeRing ring, ImmutableHashSet <UniqueAddress> oldReceiversNowUnreachable, IFailureDetectorRegistry <Address> failureDetector) { Ring = ring; OldReceiversNowUnreachable = oldReceiversNowUnreachable; FailureDetector = failureDetector; ActiveReceivers = Ring.MyReceivers.Value.Union(OldReceiversNowUnreachable); }
private ClusterHeartbeatSenderState MembershipChange(HeartbeatNodeRing newRing) { var oldReceivers = Ring.MyReceivers.Value; var removedReceivers = oldReceivers.Except(newRing.MyReceivers.Value); var adjustedOldReceiversNowUnreachable = OldReceiversNowUnreachable; foreach (var r in removedReceivers) { if (FailureDetector.IsAvailable(r.Address)) { FailureDetector.Remove(r.Address); } else { adjustedOldReceiversNowUnreachable = adjustedOldReceiversNowUnreachable.Add(r); } } return(Copy(newRing, adjustedOldReceiversNowUnreachable)); }
private ClusterHeartbeatSenderState MembershipChange(HeartbeatNodeRing newRing) { var oldReceivers = Ring.MyReceivers.Value; var removedReceivers = oldReceivers.Except(newRing.MyReceivers.Value); var newUnreachable = Unreachable; foreach (var r in removedReceivers) { if (FailureDetector.IsAvailable(r.Address)) FailureDetector.Remove(r.Address); else { newUnreachable = newUnreachable.Add(r); } } return Copy(newRing, newUnreachable); }
public ClusterHeartbeatSenderState Copy(HeartbeatNodeRing ring = null, ImmutableHashSet<UniqueAddress> unreachable = null, IFailureDetectorRegistry<Address> failureDetector = null) { return new ClusterHeartbeatSenderState(ring ?? Ring, unreachable ?? Unreachable, failureDetector ?? FailureDetector); }
public ClusterHeartbeatSenderState(HeartbeatNodeRing ring, ImmutableHashSet<UniqueAddress> unreachable, IFailureDetectorRegistry<Address> failureDetector) { FailureDetector = failureDetector; Unreachable = unreachable; Ring = ring; ActiveReceivers = Ring.MyReceivers.Value.Union(Unreachable); }
/// <summary> /// TBD /// </summary> /// <param name="ring">TBD</param> /// <param name="oldReceiversNowUnreachable">TBD</param> /// <param name="failureDetector">TBD</param> /// <returns>TBD</returns> public ClusterHeartbeatSenderState Copy(HeartbeatNodeRing ring = null, ImmutableHashSet <UniqueAddress> oldReceiversNowUnreachable = null, IFailureDetectorRegistry <Address> failureDetector = null) { return(new ClusterHeartbeatSenderState(ring ?? Ring, oldReceiversNowUnreachable ?? OldReceiversNowUnreachable, failureDetector ?? FailureDetector)); }