org.apache.tajo.rpc.RpcProtos Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tajo-rpc Show documentation
Show all versions of tajo-rpc Show documentation
RPC Server/Client Implementation based on Netty and Protocol Buffer
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: RpcProtos.proto
package org.apache.tajo.rpc;
public final class RpcProtos {
private RpcProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public interface RpcRequestOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// required int32 id = 1;
/**
* required int32 id = 1;
*/
boolean hasId();
/**
* required int32 id = 1;
*/
int getId();
// required string method_name = 2;
/**
* required string method_name = 2;
*/
boolean hasMethodName();
/**
* required string method_name = 2;
*/
java.lang.String getMethodName();
/**
* required string method_name = 2;
*/
com.google.protobuf.ByteString
getMethodNameBytes();
// optional bytes request_message = 3;
/**
* optional bytes request_message = 3;
*/
boolean hasRequestMessage();
/**
* optional bytes request_message = 3;
*/
com.google.protobuf.ByteString getRequestMessage();
}
/**
* Protobuf type {@code RpcRequest}
*/
public static final class RpcRequest extends
com.google.protobuf.GeneratedMessage
implements RpcRequestOrBuilder {
// Use RpcRequest.newBuilder() to construct.
private RpcRequest(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private RpcRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final RpcRequest defaultInstance;
public static RpcRequest getDefaultInstance() {
return defaultInstance;
}
public RpcRequest getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RpcRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
bitField0_ |= 0x00000001;
id_ = input.readInt32();
break;
}
case 18: {
bitField0_ |= 0x00000002;
methodName_ = input.readBytes();
break;
}
case 26: {
bitField0_ |= 0x00000004;
requestMessage_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.tajo.rpc.RpcProtos.internal_static_RpcRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.tajo.rpc.RpcProtos.internal_static_RpcRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.tajo.rpc.RpcProtos.RpcRequest.class, org.apache.tajo.rpc.RpcProtos.RpcRequest.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public RpcRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RpcRequest(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// required int32 id = 1;
public static final int ID_FIELD_NUMBER = 1;
private int id_;
/**
* required int32 id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required int32 id = 1;
*/
public int getId() {
return id_;
}
// required string method_name = 2;
public static final int METHOD_NAME_FIELD_NUMBER = 2;
private java.lang.Object methodName_;
/**
* required string method_name = 2;
*/
public boolean hasMethodName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* required string method_name = 2;
*/
public java.lang.String getMethodName() {
java.lang.Object ref = methodName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
methodName_ = s;
}
return s;
}
}
/**
* required string method_name = 2;
*/
public com.google.protobuf.ByteString
getMethodNameBytes() {
java.lang.Object ref = methodName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
methodName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional bytes request_message = 3;
public static final int REQUEST_MESSAGE_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString requestMessage_;
/**
* optional bytes request_message = 3;
*/
public boolean hasRequestMessage() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional bytes request_message = 3;
*/
public com.google.protobuf.ByteString getRequestMessage() {
return requestMessage_;
}
private void initFields() {
id_ = 0;
methodName_ = "";
requestMessage_ = com.google.protobuf.ByteString.EMPTY;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
if (!hasId()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasMethodName()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(1, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(2, getMethodNameBytes());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeBytes(3, requestMessage_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, getMethodNameBytes());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, requestMessage_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.apache.tajo.rpc.RpcProtos.RpcRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.tajo.rpc.RpcProtos.RpcRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.tajo.rpc.RpcProtos.RpcRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.tajo.rpc.RpcProtos.RpcRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.tajo.rpc.RpcProtos.RpcRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.apache.tajo.rpc.RpcProtos.RpcRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.apache.tajo.rpc.RpcProtos.RpcRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.apache.tajo.rpc.RpcProtos.RpcRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.apache.tajo.rpc.RpcProtos.RpcRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.apache.tajo.rpc.RpcProtos.RpcRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.apache.tajo.rpc.RpcProtos.RpcRequest prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code RpcRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.apache.tajo.rpc.RpcProtos.RpcRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.tajo.rpc.RpcProtos.internal_static_RpcRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.tajo.rpc.RpcProtos.internal_static_RpcRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.tajo.rpc.RpcProtos.RpcRequest.class, org.apache.tajo.rpc.RpcProtos.RpcRequest.Builder.class);
}
// Construct using org.apache.tajo.rpc.RpcProtos.RpcRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
id_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
methodName_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
requestMessage_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.apache.tajo.rpc.RpcProtos.internal_static_RpcRequest_descriptor;
}
public org.apache.tajo.rpc.RpcProtos.RpcRequest getDefaultInstanceForType() {
return org.apache.tajo.rpc.RpcProtos.RpcRequest.getDefaultInstance();
}
public org.apache.tajo.rpc.RpcProtos.RpcRequest build() {
org.apache.tajo.rpc.RpcProtos.RpcRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.apache.tajo.rpc.RpcProtos.RpcRequest buildPartial() {
org.apache.tajo.rpc.RpcProtos.RpcRequest result = new org.apache.tajo.rpc.RpcProtos.RpcRequest(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.id_ = id_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.methodName_ = methodName_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.requestMessage_ = requestMessage_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.apache.tajo.rpc.RpcProtos.RpcRequest) {
return mergeFrom((org.apache.tajo.rpc.RpcProtos.RpcRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.apache.tajo.rpc.RpcProtos.RpcRequest other) {
if (other == org.apache.tajo.rpc.RpcProtos.RpcRequest.getDefaultInstance()) return this;
if (other.hasId()) {
setId(other.getId());
}
if (other.hasMethodName()) {
bitField0_ |= 0x00000002;
methodName_ = other.methodName_;
onChanged();
}
if (other.hasRequestMessage()) {
setRequestMessage(other.getRequestMessage());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasId()) {
return false;
}
if (!hasMethodName()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.apache.tajo.rpc.RpcProtos.RpcRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.apache.tajo.rpc.RpcProtos.RpcRequest) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// required int32 id = 1;
private int id_ ;
/**
* required int32 id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required int32 id = 1;
*/
public int getId() {
return id_;
}
/**
* required int32 id = 1;
*/
public Builder setId(int value) {
bitField0_ |= 0x00000001;
id_ = value;
onChanged();
return this;
}
/**
* required int32 id = 1;
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000001);
id_ = 0;
onChanged();
return this;
}
// required string method_name = 2;
private java.lang.Object methodName_ = "";
/**
* required string method_name = 2;
*/
public boolean hasMethodName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* required string method_name = 2;
*/
public java.lang.String getMethodName() {
java.lang.Object ref = methodName_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
methodName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* required string method_name = 2;
*/
public com.google.protobuf.ByteString
getMethodNameBytes() {
java.lang.Object ref = methodName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
methodName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* required string method_name = 2;
*/
public Builder setMethodName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
methodName_ = value;
onChanged();
return this;
}
/**
* required string method_name = 2;
*/
public Builder clearMethodName() {
bitField0_ = (bitField0_ & ~0x00000002);
methodName_ = getDefaultInstance().getMethodName();
onChanged();
return this;
}
/**
* required string method_name = 2;
*/
public Builder setMethodNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
methodName_ = value;
onChanged();
return this;
}
// optional bytes request_message = 3;
private com.google.protobuf.ByteString requestMessage_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes request_message = 3;
*/
public boolean hasRequestMessage() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional bytes request_message = 3;
*/
public com.google.protobuf.ByteString getRequestMessage() {
return requestMessage_;
}
/**
* optional bytes request_message = 3;
*/
public Builder setRequestMessage(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
requestMessage_ = value;
onChanged();
return this;
}
/**
* optional bytes request_message = 3;
*/
public Builder clearRequestMessage() {
bitField0_ = (bitField0_ & ~0x00000004);
requestMessage_ = getDefaultInstance().getRequestMessage();
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:RpcRequest)
}
static {
defaultInstance = new RpcRequest(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:RpcRequest)
}
public interface RpcResponseOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// required int32 id = 1;
/**
* required int32 id = 1;
*/
boolean hasId();
/**
* required int32 id = 1;
*/
int getId();
// optional bytes response_message = 2;
/**
* optional bytes response_message = 2;
*/
boolean hasResponseMessage();
/**
* optional bytes response_message = 2;
*/
com.google.protobuf.ByteString getResponseMessage();
// optional string error_message = 3;
/**
* optional string error_message = 3;
*/
boolean hasErrorMessage();
/**
* optional string error_message = 3;
*/
java.lang.String getErrorMessage();
/**
* optional string error_message = 3;
*/
com.google.protobuf.ByteString
getErrorMessageBytes();
}
/**
* Protobuf type {@code RpcResponse}
*/
public static final class RpcResponse extends
com.google.protobuf.GeneratedMessage
implements RpcResponseOrBuilder {
// Use RpcResponse.newBuilder() to construct.
private RpcResponse(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private RpcResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final RpcResponse defaultInstance;
public static RpcResponse getDefaultInstance() {
return defaultInstance;
}
public RpcResponse getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RpcResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
bitField0_ |= 0x00000001;
id_ = input.readInt32();
break;
}
case 18: {
bitField0_ |= 0x00000002;
responseMessage_ = input.readBytes();
break;
}
case 26: {
bitField0_ |= 0x00000004;
errorMessage_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.tajo.rpc.RpcProtos.internal_static_RpcResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.tajo.rpc.RpcProtos.internal_static_RpcResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.tajo.rpc.RpcProtos.RpcResponse.class, org.apache.tajo.rpc.RpcProtos.RpcResponse.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public RpcResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RpcResponse(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// required int32 id = 1;
public static final int ID_FIELD_NUMBER = 1;
private int id_;
/**
* required int32 id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required int32 id = 1;
*/
public int getId() {
return id_;
}
// optional bytes response_message = 2;
public static final int RESPONSE_MESSAGE_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString responseMessage_;
/**
* optional bytes response_message = 2;
*/
public boolean hasResponseMessage() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional bytes response_message = 2;
*/
public com.google.protobuf.ByteString getResponseMessage() {
return responseMessage_;
}
// optional string error_message = 3;
public static final int ERROR_MESSAGE_FIELD_NUMBER = 3;
private java.lang.Object errorMessage_;
/**
* optional string error_message = 3;
*/
public boolean hasErrorMessage() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional string error_message = 3;
*/
public java.lang.String getErrorMessage() {
java.lang.Object ref = errorMessage_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
errorMessage_ = s;
}
return s;
}
}
/**
* optional string error_message = 3;
*/
public com.google.protobuf.ByteString
getErrorMessageBytes() {
java.lang.Object ref = errorMessage_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
errorMessage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private void initFields() {
id_ = 0;
responseMessage_ = com.google.protobuf.ByteString.EMPTY;
errorMessage_ = "";
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
if (!hasId()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(1, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(2, responseMessage_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeBytes(3, getErrorMessageBytes());
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, responseMessage_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, getErrorMessageBytes());
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.apache.tajo.rpc.RpcProtos.RpcResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.tajo.rpc.RpcProtos.RpcResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.tajo.rpc.RpcProtos.RpcResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.tajo.rpc.RpcProtos.RpcResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.tajo.rpc.RpcProtos.RpcResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.apache.tajo.rpc.RpcProtos.RpcResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.apache.tajo.rpc.RpcProtos.RpcResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.apache.tajo.rpc.RpcProtos.RpcResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.apache.tajo.rpc.RpcProtos.RpcResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.apache.tajo.rpc.RpcProtos.RpcResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.apache.tajo.rpc.RpcProtos.RpcResponse prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code RpcResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.apache.tajo.rpc.RpcProtos.RpcResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.tajo.rpc.RpcProtos.internal_static_RpcResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.tajo.rpc.RpcProtos.internal_static_RpcResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.tajo.rpc.RpcProtos.RpcResponse.class, org.apache.tajo.rpc.RpcProtos.RpcResponse.Builder.class);
}
// Construct using org.apache.tajo.rpc.RpcProtos.RpcResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
id_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
responseMessage_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
errorMessage_ = "";
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.apache.tajo.rpc.RpcProtos.internal_static_RpcResponse_descriptor;
}
public org.apache.tajo.rpc.RpcProtos.RpcResponse getDefaultInstanceForType() {
return org.apache.tajo.rpc.RpcProtos.RpcResponse.getDefaultInstance();
}
public org.apache.tajo.rpc.RpcProtos.RpcResponse build() {
org.apache.tajo.rpc.RpcProtos.RpcResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.apache.tajo.rpc.RpcProtos.RpcResponse buildPartial() {
org.apache.tajo.rpc.RpcProtos.RpcResponse result = new org.apache.tajo.rpc.RpcProtos.RpcResponse(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.id_ = id_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.responseMessage_ = responseMessage_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.errorMessage_ = errorMessage_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.apache.tajo.rpc.RpcProtos.RpcResponse) {
return mergeFrom((org.apache.tajo.rpc.RpcProtos.RpcResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.apache.tajo.rpc.RpcProtos.RpcResponse other) {
if (other == org.apache.tajo.rpc.RpcProtos.RpcResponse.getDefaultInstance()) return this;
if (other.hasId()) {
setId(other.getId());
}
if (other.hasResponseMessage()) {
setResponseMessage(other.getResponseMessage());
}
if (other.hasErrorMessage()) {
bitField0_ |= 0x00000004;
errorMessage_ = other.errorMessage_;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
if (!hasId()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.apache.tajo.rpc.RpcProtos.RpcResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.apache.tajo.rpc.RpcProtos.RpcResponse) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// required int32 id = 1;
private int id_ ;
/**
* required int32 id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required int32 id = 1;
*/
public int getId() {
return id_;
}
/**
* required int32 id = 1;
*/
public Builder setId(int value) {
bitField0_ |= 0x00000001;
id_ = value;
onChanged();
return this;
}
/**
* required int32 id = 1;
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000001);
id_ = 0;
onChanged();
return this;
}
// optional bytes response_message = 2;
private com.google.protobuf.ByteString responseMessage_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes response_message = 2;
*/
public boolean hasResponseMessage() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional bytes response_message = 2;
*/
public com.google.protobuf.ByteString getResponseMessage() {
return responseMessage_;
}
/**
* optional bytes response_message = 2;
*/
public Builder setResponseMessage(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
responseMessage_ = value;
onChanged();
return this;
}
/**
* optional bytes response_message = 2;
*/
public Builder clearResponseMessage() {
bitField0_ = (bitField0_ & ~0x00000002);
responseMessage_ = getDefaultInstance().getResponseMessage();
onChanged();
return this;
}
// optional string error_message = 3;
private java.lang.Object errorMessage_ = "";
/**
* optional string error_message = 3;
*/
public boolean hasErrorMessage() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional string error_message = 3;
*/
public java.lang.String getErrorMessage() {
java.lang.Object ref = errorMessage_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
errorMessage_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string error_message = 3;
*/
public com.google.protobuf.ByteString
getErrorMessageBytes() {
java.lang.Object ref = errorMessage_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
errorMessage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string error_message = 3;
*/
public Builder setErrorMessage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
errorMessage_ = value;
onChanged();
return this;
}
/**
* optional string error_message = 3;
*/
public Builder clearErrorMessage() {
bitField0_ = (bitField0_ & ~0x00000004);
errorMessage_ = getDefaultInstance().getErrorMessage();
onChanged();
return this;
}
/**
* optional string error_message = 3;
*/
public Builder setErrorMessageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
errorMessage_ = value;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:RpcResponse)
}
static {
defaultInstance = new RpcResponse(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:RpcResponse)
}
private static com.google.protobuf.Descriptors.Descriptor
internal_static_RpcRequest_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_RpcRequest_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_RpcResponse_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_RpcResponse_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\017RpcProtos.proto\"F\n\nRpcRequest\022\n\n\002id\030\001 " +
"\002(\005\022\023\n\013method_name\030\002 \002(\t\022\027\n\017request_mess" +
"age\030\003 \001(\014\"J\n\013RpcResponse\022\n\n\002id\030\001 \002(\005\022\030\n\020" +
"response_message\030\002 \001(\014\022\025\n\rerror_message\030" +
"\003 \001(\tB \n\023org.apache.tajo.rpcB\tRpcProtos"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
internal_static_RpcRequest_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_RpcRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_RpcRequest_descriptor,
new java.lang.String[] { "Id", "MethodName", "RequestMessage", });
internal_static_RpcResponse_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_RpcResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_RpcResponse_descriptor,
new java.lang.String[] { "Id", "ResponseMessage", "ErrorMessage", });
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
}
// @@protoc_insertion_point(outer_class_scope)
}