in ratis-netty/src/main/java/org/apache/ratis/netty/NettyRpcProxy.java [77:98]
public static long getCallId(RaftNettyServerReplyProto proto) {
switch (proto.getRaftNettyServerReplyCase()) {
case REQUESTVOTEREPLY:
return proto.getRequestVoteReply().getServerReply().getCallId();
case STARTLEADERELECTIONREPLY:
return proto.getStartLeaderElectionReply().getServerReply().getCallId();
case APPENDENTRIESREPLY:
return proto.getAppendEntriesReply().getServerReply().getCallId();
case INSTALLSNAPSHOTREPLY:
return proto.getInstallSnapshotReply().getServerReply().getCallId();
case RAFTCLIENTREPLY:
return proto.getRaftClientReply().getRpcReply().getCallId();
case EXCEPTIONREPLY:
return proto.getExceptionReply().getRpcReply().getCallId();
case RAFTNETTYSERVERREPLY_NOT_SET:
throw new IllegalArgumentException("Reply case not set in proto: "
+ proto.getRaftNettyServerReplyCase());
default:
throw new UnsupportedOperationException("Reply case not supported: "
+ proto.getRaftNettyServerReplyCase());
}
}