private void HandleElected(Elected msg)
        {
            participant = false;

            Console.WriteLine("[Actor " + id + "] Leader elected " + msg.LeaderId);

            leaderId = id;

            neighbour.Tell(msg);
        }
Ejemplo n.º 2
0
 private void HandleElected(Elected x)
 {
     if (x.Id == id)
     {
         Console.WriteLine("All have been notified...Leader is " + id);
     }
     else
     {
         leaderId = x.Id;
         rightNeighbour.Tell(x);
     }
 }