public Endpoints listeners(int voterId) {
        return Optional.ofNullable(voters.get(voterId))
            .map(VoterNode::listeners)
            .orElse(Endpoints.empty());
    }
Returns all of the endpoints for a voter id.

{@code Endpoints.empty()} is returned if the id is not a voter.

@param voterId the id of the voter
@return the endpoints for the voter
raft/src/main/java/org/apache/kafka/raft/internals/VoterSet.java