public interface ProtoUtils
| Modifier and Type | Method and Description |
|---|---|
static org.apache.ratis.thirdparty.com.google.protobuf.ByteString |
toByteString(byte[] bytes) |
static org.apache.ratis.thirdparty.com.google.protobuf.ByteString |
toByteString(byte[] bytes,
int offset,
int size) |
static org.apache.ratis.thirdparty.com.google.protobuf.ByteString |
toByteString(String string) |
static org.apache.ratis.proto.RaftProtos.CommitInfoProto |
toCommitInfoProto(RaftPeer peer,
long commitIndex) |
static Object |
toObject(org.apache.ratis.thirdparty.com.google.protobuf.ByteString bytes) |
static RaftGroup |
toRaftGroup(org.apache.ratis.proto.RaftProtos.RaftGroupProto proto) |
static RaftGroupId |
toRaftGroupId(org.apache.ratis.proto.RaftProtos.RaftGroupIdProto proto) |
static org.apache.ratis.proto.RaftProtos.RaftGroupIdProto.Builder |
toRaftGroupIdProtoBuilder(RaftGroupId id) |
static RaftGroupMemberId |
toRaftGroupMemberId(org.apache.ratis.thirdparty.com.google.protobuf.ByteString peerId,
org.apache.ratis.proto.RaftProtos.RaftGroupIdProto groupId) |
static RaftGroupMemberId |
toRaftGroupMemberId(org.apache.ratis.proto.RaftProtos.RaftGroupMemberIdProto memberId) |
static org.apache.ratis.proto.RaftProtos.RaftGroupMemberIdProto.Builder |
toRaftGroupMemberIdProtoBuilder(RaftGroupMemberId memberId) |
static org.apache.ratis.proto.RaftProtos.RaftGroupProto.Builder |
toRaftGroupProtoBuilder(RaftGroup group) |
static RaftPeer |
toRaftPeer(org.apache.ratis.proto.RaftProtos.RaftPeerProto p) |
static Iterable<org.apache.ratis.proto.RaftProtos.RaftPeerIdProto> |
toRaftPeerIdProtos(Collection<RaftPeerId> peers) |
static Iterable<org.apache.ratis.proto.RaftProtos.RaftPeerProto> |
toRaftPeerProtos(Collection<RaftPeer> peers) |
static List<RaftPeer> |
toRaftPeers(List<org.apache.ratis.proto.RaftProtos.RaftPeerProto> protos) |
static Iterable<org.apache.ratis.proto.RaftProtos.RouteProto> |
toRouteProtos(Map<RaftPeerId,Set<RaftPeerId>> routingTable) |
static org.apache.ratis.proto.RaftProtos.SlidingWindowEntry |
toSlidingWindowEntry(long seqNum,
boolean isFirst) |
static String |
toString(Collection<org.apache.ratis.proto.RaftProtos.CommitInfoProto> protos) |
static String |
toString(org.apache.ratis.proto.RaftProtos.CommitInfoProto proto) |
static String |
toString(org.apache.ratis.proto.RaftProtos.RaftRpcReplyProto proto) |
static String |
toString(org.apache.ratis.proto.RaftProtos.RaftRpcRequestProto proto) |
static String |
toString(org.apache.ratis.proto.RaftProtos.SlidingWindowEntry proto) |
static <T extends Throwable> |
toThrowable(org.apache.ratis.proto.RaftProtos.ThrowableProto proto,
Class<T> clazz) |
static org.apache.ratis.proto.RaftProtos.ThrowableProto |
toThrowableProto(Throwable t) |
static org.apache.ratis.thirdparty.com.google.protobuf.ByteString |
writeObject2ByteString(Object obj) |
static org.apache.ratis.thirdparty.com.google.protobuf.ByteString writeObject2ByteString(Object obj)
static Object toObject(org.apache.ratis.thirdparty.com.google.protobuf.ByteString bytes)
static org.apache.ratis.proto.RaftProtos.ThrowableProto toThrowableProto(Throwable t)
static <T extends Throwable> T toThrowable(org.apache.ratis.proto.RaftProtos.ThrowableProto proto, Class<T> clazz)
static org.apache.ratis.thirdparty.com.google.protobuf.ByteString toByteString(String string)
static org.apache.ratis.thirdparty.com.google.protobuf.ByteString toByteString(byte[] bytes)
static org.apache.ratis.thirdparty.com.google.protobuf.ByteString toByteString(byte[] bytes,
int offset,
int size)
static RaftPeer toRaftPeer(org.apache.ratis.proto.RaftProtos.RaftPeerProto p)
static List<RaftPeer> toRaftPeers(List<org.apache.ratis.proto.RaftProtos.RaftPeerProto> protos)
static Iterable<org.apache.ratis.proto.RaftProtos.RaftPeerProto> toRaftPeerProtos(Collection<RaftPeer> peers)
static Iterable<org.apache.ratis.proto.RaftProtos.RaftPeerIdProto> toRaftPeerIdProtos(Collection<RaftPeerId> peers)
static Iterable<org.apache.ratis.proto.RaftProtos.RouteProto> toRouteProtos(Map<RaftPeerId,Set<RaftPeerId>> routingTable)
static RaftGroupId toRaftGroupId(org.apache.ratis.proto.RaftProtos.RaftGroupIdProto proto)
static org.apache.ratis.proto.RaftProtos.RaftGroupIdProto.Builder toRaftGroupIdProtoBuilder(RaftGroupId id)
static RaftGroup toRaftGroup(org.apache.ratis.proto.RaftProtos.RaftGroupProto proto)
static org.apache.ratis.proto.RaftProtos.RaftGroupProto.Builder toRaftGroupProtoBuilder(RaftGroup group)
static RaftGroupMemberId toRaftGroupMemberId(org.apache.ratis.thirdparty.com.google.protobuf.ByteString peerId, org.apache.ratis.proto.RaftProtos.RaftGroupIdProto groupId)
static RaftGroupMemberId toRaftGroupMemberId(org.apache.ratis.proto.RaftProtos.RaftGroupMemberIdProto memberId)
static org.apache.ratis.proto.RaftProtos.RaftGroupMemberIdProto.Builder toRaftGroupMemberIdProtoBuilder(RaftGroupMemberId memberId)
static org.apache.ratis.proto.RaftProtos.CommitInfoProto toCommitInfoProto(RaftPeer peer, long commitIndex)
static String toString(org.apache.ratis.proto.RaftProtos.CommitInfoProto proto)
static String toString(Collection<org.apache.ratis.proto.RaftProtos.CommitInfoProto> protos)
static org.apache.ratis.proto.RaftProtos.SlidingWindowEntry toSlidingWindowEntry(long seqNum,
boolean isFirst)
static String toString(org.apache.ratis.proto.RaftProtos.SlidingWindowEntry proto)
static String toString(org.apache.ratis.proto.RaftProtos.RaftRpcRequestProto proto)
static String toString(org.apache.ratis.proto.RaftProtos.RaftRpcReplyProto proto)
Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.