Akka.Cluster.ClusterEvent.DiffReachable C# (CSharp) Метод

DiffReachable() статический приватный Метод

static private DiffReachable ( Gossip oldGossip, Gossip newGossip ) : ImmutableList
oldGossip Gossip
newGossip Gossip
Результат ImmutableList
        internal static ImmutableList<ReachableMember> DiffReachable(Gossip oldGossip, Gossip newGossip)
        {
            if (newGossip.Equals(oldGossip)) return ImmutableList.Create<ReachableMember>();
            return
                oldGossip.Overview.Reachability.AllUnreachable
                    .Where(a => newGossip.HasMember(a) && newGossip.Overview.Reachability.IsReachable(a))
                    .Select(a => new ReachableMember(newGossip.GetMember(a)))
                    .ToImmutableList();
        }

Usage Example

Пример #1
0
 private void PublishDiff(Gossip oldGossip, Gossip newGossip, Action <object> pub)
 {
     foreach (var @event in ClusterEvent.DiffMemberEvents(oldGossip, newGossip))
     {
         pub(@event);
     }
     foreach (var @event in ClusterEvent.DiffUnreachable(oldGossip, newGossip))
     {
         pub(@event);
     }
     foreach (var @event in ClusterEvent.DiffReachable(oldGossip, newGossip))
     {
         pub(@event);
     }
     foreach (var @event in ClusterEvent.DiffLeader(oldGossip, newGossip, _selfUniqueAddress))
     {
         pub(@event);
     }
     foreach (var @event in ClusterEvent.DiffRolesLeader(oldGossip, newGossip, _selfUniqueAddress))
     {
         pub(@event);
     }
     // publish internal SeenState for testing purposes
     foreach (var @event in ClusterEvent.DiffSeen(oldGossip, newGossip, _selfUniqueAddress))
     {
         pub(@event);
     }
     foreach (var @event in ClusterEvent.DiffReachability(oldGossip, newGossip))
     {
         pub(@event);
     }
 }
All Usage Examples Of Akka.Cluster.ClusterEvent::DiffReachable