@Test public void testGetStateReply() { GetStateReplyProto protoOpen = LogServiceProtoUtil.toGetStateReplyProto(LogStream.State.OPEN); assertEquals(LogStreamState.OPEN, protoOpen.getState()); GetStateReplyProto protoClosed = LogServiceProtoUtil.toGetStateReplyProto(State.CLOSED); assertEquals(LogStreamState.CLOSED, protoClosed.getState()); GetStateReplyProto protoArchiving= LogServiceProtoUtil.toGetStateReplyProto(LogStream.State.ARCHIVING); assertEquals(LogStreamState.ARCHIVING, protoArchiving.getState()); GetStateReplyProto protoArchived = LogServiceProtoUtil.toGetStateReplyProto(State.ARCHIVED); assertEquals(LogStreamState.ARCHIVED, protoArchived.getState()); GetStateReplyProto protoDeleted = LogServiceProtoUtil.toGetStateReplyProto(LogStream.State.DELETED); assertEquals(LogStreamState.DELETED, protoDeleted.getState()); }
public static GetStateReplyProto toGetStateReplyProto(State state) { return GetStateReplyProto.newBuilder().setState(LogStreamState.valueOf(state.name())).build(); }
LogServiceProtoUtil { public static GetStateReplyProto toGetStateReplyProto(State state) { return GetStateReplyProto.newBuilder().setState(LogStreamState.valueOf(state.name())).build(); } }
LogServiceProtoUtil { public static GetStateReplyProto toGetStateReplyProto(State state) { return GetStateReplyProto.newBuilder().setState(LogStreamState.valueOf(state.name())).build(); }  }
LogServiceProtoUtil { public static GetStateReplyProto toGetStateReplyProto(State state) { return GetStateReplyProto.newBuilder().setState(LogStreamState.valueOf(state.name())).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 GetStateReplyProto toGetStateReplyProto(State state) { return GetStateReplyProto.newBuilder().setState(LogStreamState.valueOf(state.name())).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);  }