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

@return Indicates whether this server is the leader.