Exemplo n.º 1
0
        /// <summary>
        /// Updates the latest known oldest generation of the remote shard.
        /// The new value must be greater or equal than the last known oldest generation.
        /// This method is called as a response to a package from the neighbor.
        /// If the value changed, the outbound RCS stack is trimmed accordingly.
        /// </summary>
        /// <param name="newOldestGeneration">Updated oldest generation of the linked shard</param>
        /// <param name="currentTLG">Current simulation Top Level Generation (TLG)</param>
        public void SetOldestGeneration(int newOldestGeneration, int currentTLG)
        {
            if (oldestGeneration == newOldestGeneration)
            {
                return;
            }
            oldestGeneration = newOldestGeneration;
#if !DRY_RUN
            if (OutStack != null)
            {
                OutStack.SignalOldestGenerationUpdateAsync(Simulation.ID.ReplicaLevel, newOldestGeneration, currentTLG).Wait();
            }
#endif
            Log.Message(Name + ": ->g" + newOldestGeneration);
        }
Exemplo n.º 2
0
 public ASTShuntingYard()
 {
     //outputQueue = new List<Token>();
     operatorStack = new Stack <Token>();
     outputStack   = new OutStack();
 }