Exemplo n.º 1
0
        /// <summary>
        /// join-ack(rambo)i
        /// </summary>
        private void OutJoinAck()
        {
            preJoinAck.Waitable.WaitOne();
            status.Set(NodeStatus.Active);

            var handler = eventHandlers[JoinAckEvent] as RamboJoinAckEventHandler;

            if (handler != null)
            {
                handler();
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Input join(rambo; J)i
 /// </summary>
 /// <param name="initialWorld"></param>
 public void Join(IEnumerable <INode> initialWorld)
 {
     // TODO: Entry point.
     // Here all status handling threads (see ctor) might be started
     if (status.Get() == NodeStatus.Idle)
     {
         status.Set(NodeStatus.Joining);
         hints.Set(initialWorld);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Output join(r)i, r ∈ frecon
 /// </summary>
 private void OutJoinRecon()
 {
     preJoinRecon.Waitable.WaitOne();
     recon.Join(i);
     reconStatus.Set(NodeStatus.Joining);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Output join(r)i, r ∈ rw
 /// </summary>
 private void OutJoinRw()
 {
     preJoinRw.Waitable.WaitOne();
     readerWriter.Join(i);
     rwStatus.Set(NodeStatus.Joining);
 }
Exemplo n.º 5
0
 public void Fail()
 {
     status.Set(NodeStatus.Failed);
 }