public DistributedLogServer.Role getRole() {
    return Objects.equals(Futures.get(primaryElection.getTerm()).primary().memberId(), clusterMembershipService.getLocalMember().id())
        ? DistributedLogServer.Role.LEADER
        : DistributedLogServer.Role.FOLLOWER;
  }
public DistributedLogServer . Role getRole ( ) { return Objects . equals ( Futures . get ( primaryElection . getTerm ( ) ) . primary ( ) . memberId ( ) , clusterMembershipService . getLocalMember ( ) . id ( ) ) ? DistributedLogServer . Role . LEADER : DistributedLogServer . Role . FOLLOWER ; }
Returns the current server role.

@return the current server role