Ejemplo n.º 1
0
 /// <summary>
 /// Handle StatusUpdatedEvent event.
 /// </summary>
 /// <param name="sender">Event sender.</param>
 /// <param name="e">Event argument.</param>
 private void OnNodeInfoStatusUpdated(object sender, NodeInfoEventArgs e)
 {
     Console.WriteLine("{0} {1} Node Updated {2} for {3}",
         DateTime.Now.ToShortTimeString(), e.NodeInfo.NodeType, e.NodeInfo.ToString(), e.Remark);
     NodeUpdatedEvent(this, e);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Handle NodeRemovedEvent event.
 /// </summary>
 /// <param name="sender">Event sender.</param>
 /// <param name="e">Event argument.</param>
 private void ProcessNode_NodeRemovedEvent(object sender, NodeInfoEventArgs e)
 {
     Console.WriteLine("{0} Node Removed {1}",
         DateTime.Now.ToShortTimeString(), e.NodeInfo.ToString());
     NodeUpdatedEvent(this, new NodeInfoEventArgs(e.NodeInfo, "node disconnected with this node"));
     e.NodeInfo.StatusUpdatedEvent -=
         new EventHandler<NodeInfoEventArgs>(OnNodeInfoStatusUpdated);
     RescheduleJobOnNode(e.NodeInfo);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Handle NodeAddedEvent event.
 /// </summary>
 /// <param name="sender">Event sender.</param>
 /// <param name="e">Event argument.</param>
 private void ProcessNode_NodeAddedEvent(object sender, NodeInfoEventArgs e)
 {
     Console.WriteLine("{0} {1} Node Added {2}",
         DateTime.Now.ToShortTimeString(), e.NodeInfo.NodeType, e.NodeInfo.ToString());
     NodeUpdatedEvent(this, new NodeInfoEventArgs(e.NodeInfo, "new node connected with this node"));
     e.NodeInfo.StatusUpdatedEvent +=
         new EventHandler<NodeInfoEventArgs>(OnNodeInfoStatusUpdated);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Handle NodeAddedEvent event.
 /// </summary>
 /// <param name="sender">Event sendor.</param>
 /// <param name="e">Event argument.</param>
 private void AggregatorServer_NodeAddedEvent(object sender, NodeInfoEventArgs e)
 {
     if (UpdateEclipsedTicks > 500 * 10000)
     {
         BroadcastResource();
     }
 }