@Test public void testGetStartIndexRequest() { LogName name = LogName.of("test"); LogServiceRequestProto proto = LogServiceProtoUtil.toGetStartIndexProto(name); GetLogStartIndexRequestProto request = proto.getStartIndexQuery(); assertEquals(name.getName(), request.getLogName().getName()); }
public static LogServiceRequestProto toGetStartIndexProto(LogName name) { LogNameProto logNameProto = LogNameProto.newBuilder().setName(name.getName()).build(); GetLogStartIndexRequestProto.Builder builder = GetLogStartIndexRequestProto.newBuilder(); builder.setLogName(logNameProto); return LogServiceRequestProto.newBuilder().setStartIndexQuery(builder.build()).build(); }
LogServiceProtoUtil { public static LogServiceRequestProto toGetStartIndexProto(LogName name) { LogNameProto logNameProto = LogNameProto.newBuilder().setName(name.getName()).build(); GetLogStartIndexRequestProto.Builder builder = GetLogStartIndexRequestProto.newBuilder(); builder.setLogName(logNameProto); return LogServiceRequestProto.newBuilder().setStartIndexQuery(builder.build()).build(); } }
LogServiceProtoUtil { public static LogServiceRequestProto toGetStartIndexProto(LogName name) { LogNameProto logNameProto = LogNameProto.newBuilder().setName(name.getName()).build(); GetLogStartIndexRequestProto.Builder builder = GetLogStartIndexRequestProto.newBuilder(); builder.setLogName(logNameProto); return LogServiceRequestProto.newBuilder().setStartIndexQuery(builder.build()).build(); }  }
LogServiceProtoUtil { public static LogServiceRequestProto toGetStartIndexProto(LogName name) { LogNameProto logNameProto = LogNameProto.newBuilder().setName(name.getName()).build(); GetLogStartIndexRequestProto.Builder builder = GetLogStartIndexRequestProto.newBuilder(); builder.setLogName(logNameProto); return LogServiceRequestProto.newBuilder().setStartIndexQuery(builder.build()).build(); }  static LogNameProto toLogNameProto(LogName logName); static LogName toLogName(LogServiceProtos.LogNameProto logNameProto); static LogStreamProto toLogStreamProto(LogStream logStream); static LogServiceRequestProto toChangeStateRequestProto(LogName logName, State state,
      boolean force); static LogServiceRequestProto toChangeStateRequestProto(LogName logName, State state); static LogServiceRequestProto toGetStateRequestProto(LogName logName); static ArchiveLogReplyProto toArchiveLogReplyProto(Throwable t); static LogServiceRequestProto toGetSizeRequestProto(LogName name); static LogServiceRequestProto toGetLengthRequestProto(LogName name); static LogServiceRequestProto toGetLastCommittedIndexRequestProto(LogName name); static LogServiceRequestProto toGetStartIndexProto(LogName name); static LogServiceRequestProto toReadLogRequestProto(LogName name, long start, int total); static LogServiceRequestProto toSyncLogRequestProto(LogName name); static LogServiceRequestProto toAppendEntryLogRequestProto(LogName name,
      List<byte[]> entries); static LogServiceRequestProto toAppendBBEntryLogRequestProto(LogName name,
      List<ByteBuffer> entries); static List<byte[]> toListByteArray(List<ByteString> list); static GetStateReplyProto toGetStateReplyProto(State state); static GetLogLengthReplyProto toGetLogLengthReplyProto(long length, Throwable t); static GetLogSizeReplyProto toGetLogSizeReplyProto(long size, Throwable t); static GetLogStartIndexReplyProto toGetLogStartIndexReplyProto(long length, Throwable t); static GetLogLastCommittedIndexReplyProto toGetLogLastIndexReplyProto(long lastIndex, Throwable t); static ReadLogReplyProto toReadLogReplyProto(List<byte[]> entries, Throwable t); static AppendLogEntryReplyProto toAppendLogReplyProto(List<Long> ids, Throwable t); static SyncLogReplyProto toSyncLogReplyProto(long index, Throwable t); static ArchiveLogRequestProto toExportInfoProto(ArchivalInfo info); static ArchivalInfo toExportInfo(ArchiveLogRequestProto proto); GetLogLengthReplyProto toGetLogLengthReplyProto(long length); static LogServiceException toLogException(Throwable t); static LogServiceRequestProto toExportInfoRequestProto(LogName logName); static LogServiceRequestProto toArchiveLogRequestProto(LogName logName, String location,
      long raftIndex, boolean isArchival, ArchivalInfo.ArchivalStatus status); }
LogServiceProtoUtil { public static LogServiceRequestProto toGetStartIndexProto(LogName name) { LogNameProto logNameProto = LogNameProto.newBuilder().setName(name.getName()).build(); GetLogStartIndexRequestProto.Builder builder = GetLogStartIndexRequestProto.newBuilder(); builder.setLogName(logNameProto); return LogServiceRequestProto.newBuilder().setStartIndexQuery(builder.build()).build(); }  static LogNameProto toLogNameProto(LogName logName); static LogName toLogName(LogServiceProtos.LogNameProto logNameProto); static LogStreamProto toLogStreamProto(LogStream logStream); static LogServiceRequestProto toChangeStateRequestProto(LogName logName, State state,
      boolean force); static LogServiceRequestProto toChangeStateRequestProto(LogName logName, State state); static LogServiceRequestProto toGetStateRequestProto(LogName logName); static ArchiveLogReplyProto toArchiveLogReplyProto(Throwable t); static LogServiceRequestProto toGetSizeRequestProto(LogName name); static LogServiceRequestProto toGetLengthRequestProto(LogName name); static LogServiceRequestProto toGetLastCommittedIndexRequestProto(LogName name); static LogServiceRequestProto toGetStartIndexProto(LogName name); static LogServiceRequestProto toReadLogRequestProto(LogName name, long start, int total); static LogServiceRequestProto toSyncLogRequestProto(LogName name); static LogServiceRequestProto toAppendEntryLogRequestProto(LogName name,
      List<byte[]> entries); static LogServiceRequestProto toAppendBBEntryLogRequestProto(LogName name,
      List<ByteBuffer> entries); static List<byte[]> toListByteArray(List<ByteString> list); static GetStateReplyProto toGetStateReplyProto(State state); static GetLogLengthReplyProto toGetLogLengthReplyProto(long length, Throwable t); static GetLogSizeReplyProto toGetLogSizeReplyProto(long size, Throwable t); static GetLogStartIndexReplyProto toGetLogStartIndexReplyProto(long length, Throwable t); static GetLogLastCommittedIndexReplyProto toGetLogLastIndexReplyProto(long lastIndex, Throwable t); static ReadLogReplyProto toReadLogReplyProto(List<byte[]> entries, Throwable t); static AppendLogEntryReplyProto toAppendLogReplyProto(List<Long> ids, Throwable t); static SyncLogReplyProto toSyncLogReplyProto(long index, Throwable t); static ArchiveLogRequestProto toExportInfoProto(ArchivalInfo info); static ArchivalInfo toExportInfo(ArchiveLogRequestProto proto); GetLogLengthReplyProto toGetLogLengthReplyProto(long length); static LogServiceException toLogException(Throwable t); static LogServiceRequestProto toExportInfoRequestProto(LogName logName); static LogServiceRequestProto toArchiveLogRequestProto(LogName logName, String location,
      long raftIndex, boolean isArchival, ArchivalInfo.ArchivalStatus status);  }