public static ReadLogReplyProto toReadLogReplyProto()

in ratis-logservice/src/main/java/org/apache/ratis/logservice/util/LogServiceProtoUtil.java [222:232]


  public static ReadLogReplyProto toReadLogReplyProto(List<byte[]> entries, Throwable t) {
    ReadLogReplyProto.Builder builder = ReadLogReplyProto.newBuilder();
    if (t != null) {
      builder.setException(toLogException(t));
    } else {
      for(byte[] record: entries) {
        builder.addLogRecord( ByteString.copyFrom(record));
      }
    }
    return builder.build();
  }