public Gossip(ImmutableSortedSet <Member> members, GossipOverview overview, VectorClock version) { _members = members; _overview = overview; _version = version; _membersMap = new Lazy <ImmutableDictionary <UniqueAddress, Member> >( () => members.ToImmutableDictionary(m => m.UniqueAddress, m => m)); if (Cluster.IsAssertInvariantsEnabled) { AssertInvariants(); } }
public Gossip(ImmutableSortedSet<Member> members, GossipOverview overview, VectorClock version) { _members = members; _overview = overview; _version = version; _membersMap = new Lazy<ImmutableDictionary<UniqueAddress, Member>>( () => members.ToImmutableDictionary(m => m.UniqueAddress, m => m)); ReachabilityExcludingDownedObservers = new Lazy<Reachability>(() => { var downed = Members.Where(m => m.Status == MemberStatus.Down).ToList(); return Overview.Reachability.RemoveObservers(downed.Select(m => m.UniqueAddress).ToImmutableHashSet()); }); if (Cluster.IsAssertInvariantsEnabled) AssertInvariants(); }
/// <summary> /// TBD /// </summary> /// <param name="members">TBD</param> /// <param name="overview">TBD</param> /// <param name="version">TBD</param> /// <exception cref="ArgumentException">TBD</exception> public Gossip(ImmutableSortedSet <Member> members, GossipOverview overview, VectorClock version) { _members = members; _overview = overview; _version = version; _membersMap = new Lazy <ImmutableDictionary <UniqueAddress, Member> >( () => members.ToImmutableDictionary(m => m.UniqueAddress, m => m)); ReachabilityExcludingDownedObservers = new Lazy <Reachability>(() => { var downed = Members.Where(m => m.Status == MemberStatus.Down); return(Overview.Reachability.RemoveObservers(downed.Select(m => m.UniqueAddress).ToImmutableHashSet())); }); if (Cluster.IsAssertInvariantsEnabled) { AssertInvariants(); } }
/// <summary> /// TBD /// </summary> /// <param name="members">TBD</param> /// <param name="overview">TBD</param> /// <param name="version">TBD</param> /// <returns>TBD</returns> public Gossip Copy(ImmutableSortedSet <Member> members = null, GossipOverview overview = null, VectorClock version = null) { return(new Gossip(members ?? _members, overview ?? _overview, version ?? _version)); }
/// <summary> /// TBD /// </summary> /// <param name="members">TBD</param> /// <param name="overview">TBD</param> public Gossip(ImmutableSortedSet <Member> members, GossipOverview overview) : this(members, overview, VectorClock.Create()) { }
public Gossip Copy(ImmutableSortedSet<Member> members = null, GossipOverview overview = null, VectorClock version = null) { return new Gossip(members ?? _members, overview ?? _overview, version ?? _version); }
public Gossip(ImmutableSortedSet<Member> members, GossipOverview overview) : this(members, overview, VectorClock.Create()) { }