Exemplo n.º 1
0
 private void AskForRegenerationRepetition(string nodeId, InputMovingWindow window)
 {
     try
     {
         IEnumerable <int> missingMessages = window.GetMissingMessages();
         bool any = false;
         foreach (var missingMessageNo in missingMessages)
         {
             any = true;
             _innerChannel.Publish("/emcaster/reliability/regenerateReq",
                                   new RegenerateRequest(nodeId, missingMessageNo));
         }
         if (any)
         {
             _daemon.ScheduleOne(() => AskForRegenerationRepetition(nodeId, window),
                                 TimeSpan.FromMilliseconds(200));
         }
         else
         {
             lock (_regeneratingWindows) _regeneratingWindows.Remove(window);
         }
     }
     catch (Exception ex)
     {
         Logger.Error("Unexpected error.", ex);
         throw ex;
     }
 }
Exemplo n.º 2
0
 private static void GoOne()
 {
     Console.WriteLine("tick");
     _daemon.ScheduleOne(GoOne, TimeSpan.FromMilliseconds(10));
 }