Ejemplo n.º 1
0
        public void Handle(ElectionMessage.StartElections message)
        {
            if (_state == ElectionsState.Shutdown)
            {
                return;
            }
            if (_state == ElectionsState.ElectingLeader)
            {
                return;
            }

            Log.Information("ELECTIONS: STARTING ELECTIONS.");
            ShiftToLeaderElection(_lastAttemptedView + 1);
        }
Ejemplo n.º 2
0
        public void Handle(ElectionMessage.StartElections message)
        {
            if (_state == ElectionsState.Shutdown)
            {
                return;
            }
            if (_state == ElectionsState.ElectingLeader)
            {
                return;
            }

            Log.Debug("ELECTIONS: STARTING ELECTIONS.");
            ShiftToLeaderElection(_lastAttemptedView + 1);
            _publisher.Publish(TimerMessage.Schedule.Create(SendViewChangeProofInterval,
                                                            _publisherEnvelope,
                                                            new ElectionMessage.SendViewChangeProof()));
        }
Ejemplo n.º 3
0
        public void Handle(ElectionMessage.StartElections message)
        {
            if (_state == ElectionsState.Shutdown)
            {
                return;
            }
            if (_state == ElectionsState.ElectingLeader)
            {
                return;
            }

            if (_nodeInfo.IsReadOnlyReplica)
            {
                Log.Verbose("ELECTIONS: THIS NODE IS A READ ONLY REPLICA.");
            }

            Log.Information("ELECTIONS: STARTING ELECTIONS.");
            ShiftToLeaderElection(_lastAttemptedView + 1);
        }
Ejemplo n.º 4
0
        public void Handle(ElectionMessage.StartElections message)
        {
            if (_state == ElectionsState.Shutdown)
            {
                return;
            }
            if (_state == ElectionsState.ElectingLeader)
            {
                return;
            }

            if (_nodeInfo.IsReadOnlyReplica)
            {
                Log.Verbose("ELECTIONS: THIS NODE IS A READ ONLY REPLICA.");
            }

            Log.Information("ELECTIONS: STARTING ELECTIONS.");
            ShiftToLeaderElection(_lastAttemptedView + 1);
            _publisher.Publish(TimerMessage.Schedule.Create(SendViewChangeProofInterval,
                                                            _publisherEnvelope,
                                                            new ElectionMessage.SendViewChangeProof()));
        }