Ejemplo n.º 1
0
 public void AdvertiseOldestGeneration(OldestGeneration gen)
 {
     foreach (var lnk in links)
     {
         lnk.Set("OldestGeneration", gen);
     }
 }
Ejemplo n.º 2
0
        public static void AdvertiseOldestGeneration(int gen)
        {
            if (siblings == null)
            {
                return;                 //during tests
            }
            var data = new OldestGeneration(gen);

            siblings.AdvertiseOldestGeneration(data);
            neighbors.AdvertiseOldestGeneration(data);
            DB.StopFetchingRCSs(gen);

            if (siblings.AllResponsive && siblings.OldestGeneration >= gen)
            {
                DB.RemoveInboundRCSsAsync(neighbors.Select(sibling => sibling.InboundRCSStackID), gen).Wait();
            }

            if (Consensus != null)              //tests
            {
                Consensus.TrimOut(gen - 1);
            }
            Messages.TrimGenerations(gen - 1);
        }