code: public boolean isLeader() {
      MemberId leader = this.leader;
      return leader != null && leader.equals(cluster.getMember().memberId());
    }
docs: Returns a boolean indicating whether this server is the current leader.
  
  @return Indicates whether this server is the leader.