@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + WRAPPED_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getWrappedMessage().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + WRAPPED_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getWrappedMessage().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.calcite.avatica.proto.Common.WireMessage)) { return super.equals(obj); } org.apache.calcite.avatica.proto.Common.WireMessage other = (org.apache.calcite.avatica.proto.Common.WireMessage) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && getWrappedMessage() .equals(other.getWrappedMessage()); result = result && unknownFields.equals(other.unknownFields); return result; }
@Override public Response parseResponse(byte[] bytes) throws IOException { ByteString byteString = UnsafeByteOperations.unsafeWrap(bytes); CodedInputStream inputStream = byteString.newCodedInput(); // Enable aliasing to avoid an extra copy to get at the serialized Response inside of the // WireMessage. inputStream.enableAliasing(true); WireMessage wireMsg = WireMessage.parseFrom(inputStream); String serializedMessageClassName = wireMsg.getName(); try { ResponseTranslator translator = getParserForResponse(serializedMessageClassName); return translator.transform(wireMsg.getWrappedMessage()); } catch (RuntimeException e) { if (LOG.isDebugEnabled()) { LOG.debug("Failed to parse response message '{}'", TextFormat.shortDebugString(wireMsg)); } throw e; } } }
@Override public Response parseResponse(byte[] bytes) throws IOException { ByteString byteString = UnsafeByteOperations.unsafeWrap(bytes); CodedInputStream inputStream = byteString.newCodedInput(); // Enable aliasing to avoid an extra copy to get at the serialized Response inside of the // WireMessage. inputStream.enableAliasing(true); WireMessage wireMsg = WireMessage.parseFrom(inputStream); String serializedMessageClassName = wireMsg.getName(); try { ResponseTranslator translator = getParserForResponse(serializedMessageClassName); return translator.transform(wireMsg.getWrappedMessage()); } catch (RuntimeException e) { if (LOG.isDebugEnabled()) { LOG.debug("Failed to parse response message '{}'", TextFormat.shortDebugString(wireMsg)); } throw e; } } }
@Override public Request parseRequest(byte[] bytes) throws IOException { ByteString byteString = UnsafeByteOperations.unsafeWrap(bytes); CodedInputStream inputStream = byteString.newCodedInput(); // Enable aliasing to avoid an extra copy to get at the serialized Request inside of the // WireMessage. inputStream.enableAliasing(true); WireMessage wireMsg = WireMessage.parseFrom(inputStream); String serializedMessageClassName = wireMsg.getName(); try { RequestTranslator translator = getParserForRequest(serializedMessageClassName); // The ByteString should be logical offsets into the original byte array return translator.transform(wireMsg.getWrappedMessage()); } catch (RuntimeException e) { if (LOG.isDebugEnabled()) { LOG.debug("Failed to parse request message '{}'", TextFormat.shortDebugString(wireMsg)); } throw e; } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.calcite.avatica.proto.Common.WireMessage)) { return super.equals(obj); } org.apache.calcite.avatica.proto.Common.WireMessage other = (org.apache.calcite.avatica.proto.Common.WireMessage) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && getWrappedMessage() .equals(other.getWrappedMessage()); result = result && unknownFields.equals(other.unknownFields); return result; }
@Override public Request parseRequest(byte[] bytes) throws IOException { ByteString byteString = UnsafeByteOperations.unsafeWrap(bytes); CodedInputStream inputStream = byteString.newCodedInput(); // Enable aliasing to avoid an extra copy to get at the serialized Request inside of the // WireMessage. inputStream.enableAliasing(true); WireMessage wireMsg = WireMessage.parseFrom(inputStream); String serializedMessageClassName = wireMsg.getName(); try { RequestTranslator translator = getParserForRequest(serializedMessageClassName); // The ByteString should be logical offsets into the original byte array return translator.transform(wireMsg.getWrappedMessage()); } catch (RuntimeException e) { if (LOG.isDebugEnabled()) { LOG.debug("Failed to parse request message '{}'", TextFormat.shortDebugString(wireMsg)); } throw e; } }
public Builder mergeFrom(org.apache.calcite.avatica.proto.Common.WireMessage other) { if (other == org.apache.calcite.avatica.proto.Common.WireMessage.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getWrappedMessage() != com.google.protobuf.ByteString.EMPTY) { setWrappedMessage(other.getWrappedMessage()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * <code>bytes wrapped_message = 2;</code> */ public Builder clearWrappedMessage() { wrappedMessage_ = getDefaultInstance().getWrappedMessage(); onChanged(); return this; } @java.lang.Override
public Builder mergeFrom(org.apache.calcite.avatica.proto.Common.WireMessage other) { if (other == org.apache.calcite.avatica.proto.Common.WireMessage.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getWrappedMessage() != com.google.protobuf.ByteString.EMPTY) { setWrappedMessage(other.getWrappedMessage()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * <code>bytes wrapped_message = 2;</code> */ public Builder clearWrappedMessage() { wrappedMessage_ = getDefaultInstance().getWrappedMessage(); onChanged(); return this; } @java.lang.Override
@Override public Response parseResponse(byte[] bytes) throws InvalidProtocolBufferException { WireMessage wireMsg = WireMessage.parseFrom(bytes); String serializedMessageClassName = wireMsg.getName(); ResponseTranslator translator = getParserForResponse(serializedMessageClassName); return translator.transform(wireMsg.getWrappedMessage()); } }
@Override public Request parseRequest(byte[] bytes) throws InvalidProtocolBufferException { WireMessage wireMsg = WireMessage.parseFrom(bytes); String serializedMessageClassName = wireMsg.getName(); RequestTranslator translator = getParserForRequest(serializedMessageClassName); return translator.transform(wireMsg.getWrappedMessage()); }
public Builder mergeFrom(org.apache.calcite.avatica.proto.Common.WireMessage other) { if (other == org.apache.calcite.avatica.proto.Common.WireMessage.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getWrappedMessage() != com.google.protobuf.ByteString.EMPTY) { setWrappedMessage(other.getWrappedMessage()); } onChanged(); return this; }
/** * <code>optional bytes wrapped_message = 2;</code> */ public Builder clearWrappedMessage() { wrappedMessage_ = getDefaultInstance().getWrappedMessage(); onChanged(); return this; } public final Builder setUnknownFields(