예제 #1
0
파일: DCEPNode.cs 프로젝트: samieze/aMuSE
 public void processControlMessages()
 {
     while (!controlMessageQueue.Data.IsEmpty)
     {
         DCEPControlMessage controlMessage = null;
         if (controlMessageQueue.Data.TryDequeue(out controlMessage))
         {
             if (controlMessage is NodeInfoForCoordinatorMessage)
             {
                 directorNodeService.ProcessNodeInfoForCoordinatorMessage(controlMessage as NodeInfoForCoordinatorMessage);
             }
             else if (controlMessage is UpdatedExecutionStateMessage)
             {
                 var newState = (controlMessage as UpdatedExecutionStateMessage).newState;
                 Console.WriteLine(TAG + "updated execution state from " + state.ToString() + " to " + newState.ToString());
                 state = newState;
             }
         }
     }
 }
예제 #2
0
 public void ReceiveDCEPControlMessageFork(DCEPControlMessage p_0) => node.ReceiveDCEPControlMessageAsync(p_0).Wait();
예제 #3
0
 public Task <int> ReceiveDCEPControlMessageAsync(DCEPControlMessage p_0) => node.ReceiveDCEPControlMessageAsync(p_0);
예제 #4
0
파일: DCEPNode.cs 프로젝트: samieze/aMuSE
 public async Task <int> ReceiveDCEPControlMessageAsync(DCEPControlMessage controlMessage)
 {
     controlMessageQueue.Data.Enqueue(controlMessage);
     return(0);
 }