code: public static Message buildTruncate(Zxid lastPrefixZxid, Zxid lastZxid) {
      ZabMessage.Zxid lpz = toProtoZxid(lastPrefixZxid);
      ZabMessage.Zxid lz = toProtoZxid(lastZxid);
      Truncate trunc = Truncate.newBuilder().setLastPrefixZxid(lpz)
                                            .setLastZxid(lz)
                                            .build();
      return Message.newBuilder().setType(MessageType.TRUNCATE)
                                 .setTruncate(trunc)
                                 .build();
    }
docs: Creates a TRUNCATE  message.
  
  @param lastPrefixZxid truncate receiver's log from lastPrefixZxid
  exclusively.
  @param lastZxid the last zxid for the synchronization.
  @return a protobuf message.