private void DeclareFollower() {
       if (_state == null || !_state.IsIdle)
       {
           Logger.Info($"Cluster follower: {_node}");
 
           _state = new FollowerState(_node, this, Logger);
       }
   }
        private void DeclareLeader()
        {
            Logger.Info($"Cluster leader: {_node}");
            
            _state = new LeaderState(_node, this, Logger);

            PromoteElectedLeader(_node.Id);

            _outbound.Directory(_registry.LiveNodes);

            _outbound.Leader();
        }
   private void DeclareIdle() {
       if (_state == null || !_state.IsIdle)
       {
           Logger.Info($"Cluster idle: {_node}");
 
           _state = new IdleState(_node, this, Logger);
 
           if (_registry.CurrentLeader.Equals(_node))
           {
               _registry.DemoteLeaderOf(_node.Id);
           }
       }
   }