code: public static Message buildElectionInfo(String vote, Zxid lastZxid,
                                            long ackEpoch,
                                            long round,
                                            boolean electing) {
      ZabMessage.Zxid zxid = toProtoZxid(lastZxid);
      ZabMessage.ElectionInfo ei = ZabMessage.ElectionInfo.newBuilder()
                                                          .setVote(vote)
                                                          .setZxid(zxid)
                                                          .setAckEpoch(ackEpoch)
                                                          .setIsElecting(electing)
                                                          .setRound(round)
                                                          .build();
      return Message.newBuilder().setType(MessageType.ELECTION_INFO)
                                 .setElectionInfo(ei)
                                 .build();
    }
docs: Creates the ELECTION_INFO message.
  
  @param vote the server who is selected as the leader.
  @param lastZxid the last zxid of the selected leader.
  @param round the round number.
  @param electing true if current server is in electing phase, false otw.
  @return a protobuf message.