public interface ServerProtoUtils
static TermIndex toTermIndex(org.apache.ratis.proto.RaftProtos.TermIndexProto p)
static org.apache.ratis.proto.RaftProtos.TermIndexProto toTermIndexProto(TermIndex ti)
static TermIndex toTermIndex(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
static String toTermIndexString(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
static String toTermIndexString(org.apache.ratis.proto.RaftProtos.TermIndexProto proto)
static String toLogEntryString(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
static String toStateMachineLogEntryString(org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto smLog, Function<org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto,String> function)
static String toLogEntryString(org.apache.ratis.proto.RaftProtos.LogEntryProto entry, Function<org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto,String> function)
static String toString(org.apache.ratis.proto.RaftProtos.LogEntryProto... entries)
static String toShortString(List<org.apache.ratis.proto.RaftProtos.LogEntryProto> entries)
static String toString(org.apache.ratis.proto.RaftProtos.AppendEntriesRequestProto proto)
static String toString(org.apache.ratis.proto.RaftProtos.AppendEntriesReplyProto reply)
static String toString(org.apache.ratis.proto.RaftProtos.RequestVoteReplyProto proto)
static String toString(org.apache.ratis.proto.RaftProtos.InstallSnapshotRequestProto proto)
static String toString(org.apache.ratis.proto.RaftProtos.InstallSnapshotReplyProto proto)
static org.apache.ratis.proto.RaftProtos.RaftConfigurationProto.Builder toRaftConfigurationProto(RaftConfiguration conf)
static RaftConfiguration toRaftConfiguration(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
static org.apache.ratis.proto.RaftProtos.LogEntryProto toLogEntryProto(RaftConfiguration conf, long term, long index)
static org.apache.ratis.proto.RaftProtos.LogEntryProto toLogEntryProto(org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto smLog, long term, long index)
static org.apache.ratis.proto.RaftProtos.LogEntryProto toLogEntryProto(long commitIndex, long term, long index)
static org.apache.ratis.proto.RaftProtos.MetadataProto.Builder toMetadataEntryBuilder(long commitIndex)
static org.apache.ratis.proto.RaftProtos.StateMachineEntryProto.Builder toStateMachineEntryProtoBuilder(org.apache.ratis.thirdparty.com.google.protobuf.ByteString stateMachineData)
static org.apache.ratis.proto.RaftProtos.StateMachineEntryProto.Builder toStateMachineEntryProtoBuilder(int logEntryProtoSerializedSize)
static org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto toStateMachineLogEntryProto(RaftClientRequest request, org.apache.ratis.thirdparty.com.google.protobuf.ByteString logData, org.apache.ratis.thirdparty.com.google.protobuf.ByteString stateMachineData)
static org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto toStateMachineLogEntryProto(ClientId clientId, long callId, org.apache.ratis.thirdparty.com.google.protobuf.ByteString logData, org.apache.ratis.thirdparty.com.google.protobuf.ByteString stateMachineData)
static Optional<org.apache.ratis.proto.RaftProtos.StateMachineEntryProto> getStateMachineEntry(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
static Optional<org.apache.ratis.thirdparty.com.google.protobuf.ByteString> getStateMachineData(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
static boolean shouldReadStateMachineData(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
static org.apache.ratis.proto.RaftProtos.LogEntryProto removeStateMachineData(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
static org.apache.ratis.proto.RaftProtos.LogEntryProto rebuildLogEntryProto(org.apache.ratis.proto.RaftProtos.LogEntryProto entry, org.apache.ratis.proto.RaftProtos.StateMachineEntryProto.Builder smEntry)
static org.apache.ratis.proto.RaftProtos.LogEntryProto addStateMachineData(org.apache.ratis.thirdparty.com.google.protobuf.ByteString stateMachineData, org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
stateMachineData - - state machine data to be addedentry - - log entry to which stateMachineData needs to be addedstatic int getSerializedSize(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
static org.apache.ratis.proto.RaftProtos.RaftRpcReplyProto.Builder toRaftRpcReplyProtoBuilder(RaftPeerId requestorId, RaftGroupMemberId replyId, boolean success)
static org.apache.ratis.proto.RaftProtos.RequestVoteReplyProto toRequestVoteReplyProto(RaftPeerId requestorId, RaftGroupMemberId replyId, boolean success, long term, boolean shouldShutdown)
static org.apache.ratis.proto.RaftProtos.RaftRpcRequestProto.Builder toRaftRpcRequestProtoBuilder(RaftGroupMemberId requestorId, RaftPeerId replyId)
static org.apache.ratis.proto.RaftProtos.RequestVoteRequestProto toRequestVoteRequestProto(RaftGroupMemberId requestorId, RaftPeerId replyId, long term, TermIndex lastEntry)
static org.apache.ratis.proto.RaftProtos.InstallSnapshotReplyProto toInstallSnapshotReplyProto(RaftPeerId requestorId, RaftGroupMemberId replyId, long currentTerm, int requestIndex, org.apache.ratis.proto.RaftProtos.InstallSnapshotResult result)
static org.apache.ratis.proto.RaftProtos.InstallSnapshotReplyProto toInstallSnapshotReplyProto(RaftPeerId requestorId, RaftGroupMemberId replyId, long currentTerm, org.apache.ratis.proto.RaftProtos.InstallSnapshotResult result, long installedSnapshotIndex)
static org.apache.ratis.proto.RaftProtos.InstallSnapshotReplyProto toInstallSnapshotReplyProto(RaftPeerId requestorId, RaftGroupMemberId replyId, org.apache.ratis.proto.RaftProtos.InstallSnapshotResult result)
static org.apache.ratis.proto.RaftProtos.InstallSnapshotRequestProto toInstallSnapshotRequestProto(RaftGroupMemberId requestorId, RaftPeerId replyId, String requestId, int requestIndex, long term, TermIndex lastTermIndex, List<org.apache.ratis.proto.RaftProtos.FileChunkProto> chunks, long totalSize, boolean done)
static org.apache.ratis.proto.RaftProtos.InstallSnapshotRequestProto toInstallSnapshotRequestProto(RaftGroupMemberId requestorId, RaftPeerId replyId, long leaderTerm, TermIndex firstAvailable)
static org.apache.ratis.proto.RaftProtos.AppendEntriesReplyProto toAppendEntriesReplyProto(RaftPeerId requestorId, RaftGroupMemberId replyId, long term, long followerCommit, long nextIndex, org.apache.ratis.proto.RaftProtos.AppendEntriesReplyProto.AppendResult result, long callId, long matchIndex, boolean isHeartbeat)
static org.apache.ratis.proto.RaftProtos.AppendEntriesRequestProto toAppendEntriesRequestProto(RaftGroupMemberId requestorId, RaftPeerId replyId, long leaderTerm, List<org.apache.ratis.proto.RaftProtos.LogEntryProto> entries, long leaderCommit, boolean initializing, TermIndex previous, Collection<org.apache.ratis.proto.RaftProtos.CommitInfoProto> commitInfos, long callId)
static org.apache.ratis.proto.RaftProtos.ServerRpcProto toServerRpcProto(RaftPeer peer, long delay)
Copyright © 2017–2020 The Apache Software Foundation. All rights reserved.