示例#1
0
        public IResponse VisitDoViewChange(DoViewChange doViewChange)
        {
            if (doViewChange.ViewNumber <= this.replicaState.ViewNumber)
            {
                return(null);
            }
            if (this.imTheLeader &&
                doViewChange.ViewNumber == this.viewNumber &&
                ConfigurationUtils.CompareConfigurations(doViewChange.Configuration, this.configuration))
            {
                Interlocked.Increment(ref this.messagesDoViewChange);

                if (doViewChange.OpNumber > this.bestDoViewChange.OpNumber)
                {
                    this.bestDoViewChange = doViewChange;
                }


                this.CheckNumberAndSetNewConfiguration();
            }

            return(null);
        }
 public IResponse VisitDoViewChange(DoViewChange doViewChange)
 {
     return(this.WaitNormalState(doViewChange));
 }