Пример #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();
            }
        }
Пример #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);
     }
 }
Пример #3
0
 /// <summary>
 /// Output join(r)i, r ∈ frecon
 /// </summary>
 private void OutJoinRecon()
 {
     preJoinRecon.Waitable.WaitOne();
     recon.Join(i);
     reconStatus.Set(NodeStatus.Joining);
 }
Пример #4
0
 /// <summary>
 /// Output join(r)i, r ∈ rw
 /// </summary>
 private void OutJoinRw()
 {
     preJoinRw.Waitable.WaitOne();
     readerWriter.Join(i);
     rwStatus.Set(NodeStatus.Joining);
 }
Пример #5
0
 public void Fail()
 {
     status.Set(NodeStatus.Failed);
 }