@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasRpcReply()) { hash = (37 * hash) + RPCREPLY_FIELD_NUMBER; hash = (53 * hash) + getRpcReply().hashCode(); } hash = (37 * hash) + EXCEPTION_FIELD_NUMBER; hash = (53 * hash) + getException().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public static long getCallId(RaftNettyServerReplyProto proto) { switch (proto.getRaftNettyServerReplyCase()) { case REQUESTVOTEREPLY: return proto.getRequestVoteReply().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()); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.ratis.proto.netty.NettyProtos.RaftNettyExceptionReplyProto)) { return super.equals(obj); } org.apache.ratis.proto.netty.NettyProtos.RaftNettyExceptionReplyProto other = (org.apache.ratis.proto.netty.NettyProtos.RaftNettyExceptionReplyProto) obj; boolean result = true; result = result && (hasRpcReply() == other.hasRpcReply()); if (hasRpcReply()) { result = result && getRpcReply() .equals(other.getRpcReply()); } result = result && getException() .equals(other.getException()); result = result && unknownFields.equals(other.unknownFields); return result; }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (rpcReply_ != null) { size += org.apache.ratis.thirdparty.com.google.protobuf.CodedOutputStream .computeMessageSize(1, getRpcReply()); } if (!exception_.isEmpty()) { size += org.apache.ratis.thirdparty.com.google.protobuf.CodedOutputStream .computeBytesSize(2, exception_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
public void writeTo(org.apache.ratis.thirdparty.com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (rpcReply_ != null) { output.writeMessage(1, getRpcReply()); } if (!exception_.isEmpty()) { output.writeBytes(2, exception_); } unknownFields.writeTo(output); }
public Builder mergeFrom(org.apache.ratis.proto.netty.NettyProtos.RaftNettyExceptionReplyProto other) { if (other == org.apache.ratis.proto.netty.NettyProtos.RaftNettyExceptionReplyProto.getDefaultInstance()) return this; if (other.hasRpcReply()) { mergeRpcReply(other.getRpcReply()); } if (other.getException() != org.apache.ratis.thirdparty.com.google.protobuf.ByteString.EMPTY) { setException(other.getException()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * <code>.ratis.common.RaftRpcReplyProto rpcReply = 1;</code> */ public org.apache.ratis.proto.RaftProtos.RaftRpcReplyProtoOrBuilder getRpcReplyOrBuilder() { return getRpcReply(); }