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; } } } }
public void ReceiveDCEPControlMessageFork(DCEPControlMessage p_0) => node.ReceiveDCEPControlMessageAsync(p_0).Wait();
public Task <int> ReceiveDCEPControlMessageAsync(DCEPControlMessage p_0) => node.ReceiveDCEPControlMessageAsync(p_0);
public async Task <int> ReceiveDCEPControlMessageAsync(DCEPControlMessage controlMessage) { controlMessageQueue.Data.Enqueue(controlMessage); return(0); }