alluxio.grpc.CacheRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alluxio-shaded-hadoop3-client Show documentation
Show all versions of alluxio-shaded-hadoop3-client Show documentation
Shaded Alluxio Client Module for hadoop 3
// Generated by the protocol buffer alluxio.shaded.client.com.iler. DO NOT EDIT!
// source: grpc/block_worker.proto
package alluxio.grpc;
/**
*
* Request for caching a block synchronously/asynchronously
* next available id: 7
*
*
* Protobuf type {@code alluxio.grpc.block.CacheRequest}
*/
public final class CacheRequest extends
alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:alluxio.grpc.block.CacheRequest)
CacheRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use CacheRequest.newBuilder() to construct.
private CacheRequest(alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private CacheRequest() {
sourceHost_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CacheRequest();
}
@java.lang.Override
public final alluxio.shaded.client.com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final alluxio.shaded.client.com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return alluxio.grpc.BlockWorkerProto.internal_static_alluxio_grpc_block_CacheRequest_descriptor;
}
@java.lang.Override
protected alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return alluxio.grpc.BlockWorkerProto.internal_static_alluxio_grpc_block_CacheRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
alluxio.grpc.CacheRequest.class, alluxio.grpc.CacheRequest.Builder.class);
}
private int bitField0_;
public static final int BLOCK_ID_FIELD_NUMBER = 1;
private long blockId_;
/**
* optional int64 block_id = 1;
* @return Whether the blockId field is set.
*/
@java.lang.Override
public boolean hasBlockId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional int64 block_id = 1;
* @return The blockId.
*/
@java.lang.Override
public long getBlockId() {
return blockId_;
}
public static final int SOURCE_HOST_FIELD_NUMBER = 2;
private volatile java.lang.Object sourceHost_;
/**
*
* TODO(calvin): source host and port should be replace with WorkerNetAddress
*
*
* optional string source_host = 2;
* @return Whether the sourceHost field is set.
*/
@java.lang.Override
public boolean hasSourceHost() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* TODO(calvin): source host and port should be replace with WorkerNetAddress
*
*
* optional string source_host = 2;
* @return The sourceHost.
*/
@java.lang.Override
public java.lang.String getSourceHost() {
java.lang.Object ref = sourceHost_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
alluxio.shaded.client.com.google.protobuf.ByteString bs =
(alluxio.shaded.client.com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
sourceHost_ = s;
}
return s;
}
}
/**
*
* TODO(calvin): source host and port should be replace with WorkerNetAddress
*
*
* optional string source_host = 2;
* @return The bytes for sourceHost.
*/
@java.lang.Override
public alluxio.shaded.client.com.google.protobuf.ByteString
getSourceHostBytes() {
java.lang.Object ref = sourceHost_;
if (ref instanceof java.lang.String) {
alluxio.shaded.client.com.google.protobuf.ByteString b =
alluxio.shaded.client.com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sourceHost_ = b;
return b;
} else {
return (alluxio.shaded.client.com.google.protobuf.ByteString) ref;
}
}
public static final int SOURCE_PORT_FIELD_NUMBER = 3;
private int sourcePort_;
/**
* optional int32 source_port = 3;
* @return Whether the sourcePort field is set.
*/
@java.lang.Override
public boolean hasSourcePort() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional int32 source_port = 3;
* @return The sourcePort.
*/
@java.lang.Override
public int getSourcePort() {
return sourcePort_;
}
public static final int OPEN_UFS_BLOCK_OPTIONS_FIELD_NUMBER = 4;
private alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions openUfsBlockOptions_;
/**
* optional .alluxio.proto.dataserver.OpenUfsBlockOptions open_ufs_block_options = 4;
* @return Whether the openUfsBlockOptions field is set.
*/
@java.lang.Override
public boolean hasOpenUfsBlockOptions() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .alluxio.proto.dataserver.OpenUfsBlockOptions open_ufs_block_options = 4;
* @return The openUfsBlockOptions.
*/
@java.lang.Override
public alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions getOpenUfsBlockOptions() {
return openUfsBlockOptions_ == null ? alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions.getDefaultInstance() : openUfsBlockOptions_;
}
/**
* optional .alluxio.proto.dataserver.OpenUfsBlockOptions open_ufs_block_options = 4;
*/
@java.lang.Override
public alluxio.proto.dataserver.Protocol.OpenUfsBlockOptionsOrBuilder getOpenUfsBlockOptionsOrBuilder() {
return openUfsBlockOptions_ == null ? alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions.getDefaultInstance() : openUfsBlockOptions_;
}
public static final int LENGTH_FIELD_NUMBER = 5;
private long length_;
/**
* optional int64 length = 5;
* @return Whether the length field is set.
*/
@java.lang.Override
public boolean hasLength() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional int64 length = 5;
* @return The length.
*/
@java.lang.Override
public long getLength() {
return length_;
}
public static final int ASYNC_FIELD_NUMBER = 6;
private boolean async_;
/**
* optional bool async = 6;
* @return Whether the async field is set.
*/
@java.lang.Override
public boolean hasAsync() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional bool async = 6;
* @return The async.
*/
@java.lang.Override
public boolean getAsync() {
return async_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(alluxio.shaded.client.com.google.protobuf.CodedOutputStream output)
throws java.alluxio.shaded.client.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeInt64(1, blockId_);
}
if (((bitField0_ & 0x00000002) != 0)) {
alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceHost_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeInt32(3, sourcePort_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(4, getOpenUfsBlockOptions());
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeInt64(5, length_);
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeBool(6, async_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += alluxio.shaded.client.com.google.protobuf.CodedOutputStream
.alluxio.shaded.client.com.uteInt64Size(1, blockId_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.alluxio.shaded.client.com.uteStringSize(2, sourceHost_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += alluxio.shaded.client.com.google.protobuf.CodedOutputStream
.alluxio.shaded.client.com.uteInt32Size(3, sourcePort_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += alluxio.shaded.client.com.google.protobuf.CodedOutputStream
.alluxio.shaded.client.com.uteMessageSize(4, getOpenUfsBlockOptions());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += alluxio.shaded.client.com.google.protobuf.CodedOutputStream
.alluxio.shaded.client.com.uteInt64Size(5, length_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += alluxio.shaded.client.com.google.protobuf.CodedOutputStream
.alluxio.shaded.client.com.uteBoolSize(6, async_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof alluxio.grpc.CacheRequest)) {
return super.equals(obj);
}
alluxio.grpc.CacheRequest other = (alluxio.grpc.CacheRequest) obj;
if (hasBlockId() != other.hasBlockId()) return false;
if (hasBlockId()) {
if (getBlockId()
!= other.getBlockId()) return false;
}
if (hasSourceHost() != other.hasSourceHost()) return false;
if (hasSourceHost()) {
if (!getSourceHost()
.equals(other.getSourceHost())) return false;
}
if (hasSourcePort() != other.hasSourcePort()) return false;
if (hasSourcePort()) {
if (getSourcePort()
!= other.getSourcePort()) return false;
}
if (hasOpenUfsBlockOptions() != other.hasOpenUfsBlockOptions()) return false;
if (hasOpenUfsBlockOptions()) {
if (!getOpenUfsBlockOptions()
.equals(other.getOpenUfsBlockOptions())) return false;
}
if (hasLength() != other.hasLength()) return false;
if (hasLength()) {
if (getLength()
!= other.getLength()) return false;
}
if (hasAsync() != other.hasAsync()) return false;
if (hasAsync()) {
if (getAsync()
!= other.getAsync()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasBlockId()) {
hash = (37 * hash) + BLOCK_ID_FIELD_NUMBER;
hash = (53 * hash) + alluxio.shaded.client.com.google.protobuf.Internal.hashLong(
getBlockId());
}
if (hasSourceHost()) {
hash = (37 * hash) + SOURCE_HOST_FIELD_NUMBER;
hash = (53 * hash) + getSourceHost().hashCode();
}
if (hasSourcePort()) {
hash = (37 * hash) + SOURCE_PORT_FIELD_NUMBER;
hash = (53 * hash) + getSourcePort();
}
if (hasOpenUfsBlockOptions()) {
hash = (37 * hash) + OPEN_UFS_BLOCK_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getOpenUfsBlockOptions().hashCode();
}
if (hasLength()) {
hash = (37 * hash) + LENGTH_FIELD_NUMBER;
hash = (53 * hash) + alluxio.shaded.client.com.google.protobuf.Internal.hashLong(
getLength());
}
if (hasAsync()) {
hash = (37 * hash) + ASYNC_FIELD_NUMBER;
hash = (53 * hash) + alluxio.shaded.client.com.google.protobuf.Internal.hashBoolean(
getAsync());
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static alluxio.grpc.CacheRequest parseFrom(
java.nio.ByteBuffer data)
throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static alluxio.grpc.CacheRequest parseFrom(
java.nio.ByteBuffer data,
alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static alluxio.grpc.CacheRequest parseFrom(
alluxio.shaded.client.com.google.protobuf.ByteString data)
throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static alluxio.grpc.CacheRequest parseFrom(
alluxio.shaded.client.com.google.protobuf.ByteString data,
alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static alluxio.grpc.CacheRequest parseFrom(byte[] data)
throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static alluxio.grpc.CacheRequest parseFrom(
byte[] data,
alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static alluxio.grpc.CacheRequest parseFrom(java.alluxio.shaded.client.io.InputStream input)
throws java.alluxio.shaded.client.io.IOException {
return alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static alluxio.grpc.CacheRequest parseFrom(
java.alluxio.shaded.client.io.InputStream input,
alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.alluxio.shaded.client.io.IOException {
return alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static alluxio.grpc.CacheRequest parseDelimitedFrom(java.alluxio.shaded.client.io.InputStream input)
throws java.alluxio.shaded.client.io.IOException {
return alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static alluxio.grpc.CacheRequest parseDelimitedFrom(
java.alluxio.shaded.client.io.InputStream input,
alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.alluxio.shaded.client.io.IOException {
return alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static alluxio.grpc.CacheRequest parseFrom(
alluxio.shaded.client.com.google.protobuf.CodedInputStream input)
throws java.alluxio.shaded.client.io.IOException {
return alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static alluxio.grpc.CacheRequest parseFrom(
alluxio.shaded.client.com.google.protobuf.CodedInputStream input,
alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.alluxio.shaded.client.io.IOException {
return alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(alluxio.grpc.CacheRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Request for caching a block synchronously/asynchronously
* next available id: 7
*
*
* Protobuf type {@code alluxio.grpc.block.CacheRequest}
*/
public static final class Builder extends
alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:alluxio.grpc.block.CacheRequest)
alluxio.grpc.CacheRequestOrBuilder {
public static final alluxio.shaded.client.com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return alluxio.grpc.BlockWorkerProto.internal_static_alluxio_grpc_block_CacheRequest_descriptor;
}
@java.lang.Override
protected alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return alluxio.grpc.BlockWorkerProto.internal_static_alluxio_grpc_block_CacheRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
alluxio.grpc.CacheRequest.class, alluxio.grpc.CacheRequest.Builder.class);
}
// Construct using alluxio.grpc.CacheRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getOpenUfsBlockOptionsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
blockId_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
sourceHost_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
sourcePort_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
if (openUfsBlockOptionsBuilder_ == null) {
openUfsBlockOptions_ = null;
} else {
openUfsBlockOptionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
length_ = 0L;
bitField0_ = (bitField0_ & ~0x00000010);
async_ = false;
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@java.lang.Override
public alluxio.shaded.client.com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return alluxio.grpc.BlockWorkerProto.internal_static_alluxio_grpc_block_CacheRequest_descriptor;
}
@java.lang.Override
public alluxio.grpc.CacheRequest getDefaultInstanceForType() {
return alluxio.grpc.CacheRequest.getDefaultInstance();
}
@java.lang.Override
public alluxio.grpc.CacheRequest build() {
alluxio.grpc.CacheRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public alluxio.grpc.CacheRequest buildPartial() {
alluxio.grpc.CacheRequest result = new alluxio.grpc.CacheRequest(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.blockId_ = blockId_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
to_bitField0_ |= 0x00000002;
}
result.sourceHost_ = sourceHost_;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.sourcePort_ = sourcePort_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
if (openUfsBlockOptionsBuilder_ == null) {
result.openUfsBlockOptions_ = openUfsBlockOptions_;
} else {
result.openUfsBlockOptions_ = openUfsBlockOptionsBuilder_.build();
}
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.length_ = length_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.async_ = async_;
to_bitField0_ |= 0x00000020;
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
alluxio.shaded.client.com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
alluxio.shaded.client.com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
alluxio.shaded.client.com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
alluxio.shaded.client.com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
alluxio.shaded.client.com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(alluxio.shaded.client.com.google.protobuf.Message other) {
if (other instanceof alluxio.grpc.CacheRequest) {
return mergeFrom((alluxio.grpc.CacheRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(alluxio.grpc.CacheRequest other) {
if (other == alluxio.grpc.CacheRequest.getDefaultInstance()) return this;
if (other.hasBlockId()) {
setBlockId(other.getBlockId());
}
if (other.hasSourceHost()) {
bitField0_ |= 0x00000002;
sourceHost_ = other.sourceHost_;
onChanged();
}
if (other.hasSourcePort()) {
setSourcePort(other.getSourcePort());
}
if (other.hasOpenUfsBlockOptions()) {
mergeOpenUfsBlockOptions(other.getOpenUfsBlockOptions());
}
if (other.hasLength()) {
setLength(other.getLength());
}
if (other.hasAsync()) {
setAsync(other.getAsync());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
alluxio.shaded.client.com.google.protobuf.CodedInputStream input,
alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.alluxio.shaded.client.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
blockId_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
sourceHost_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
sourcePort_ = input.readInt32();
bitField0_ |= 0x00000004;
break;
} // case 24
case 34: {
input.readMessage(
getOpenUfsBlockOptionsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 40: {
length_ = input.readInt64();
bitField0_ |= 0x00000010;
break;
} // case 40
case 48: {
async_ = input.readBool();
bitField0_ |= 0x00000020;
break;
} // case 48
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private long blockId_ ;
/**
* optional int64 block_id = 1;
* @return Whether the blockId field is set.
*/
@java.lang.Override
public boolean hasBlockId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional int64 block_id = 1;
* @return The blockId.
*/
@java.lang.Override
public long getBlockId() {
return blockId_;
}
/**
* optional int64 block_id = 1;
* @param value The blockId to set.
* @return This builder for chaining.
*/
public Builder setBlockId(long value) {
bitField0_ |= 0x00000001;
blockId_ = value;
onChanged();
return this;
}
/**
* optional int64 block_id = 1;
* @return This builder for chaining.
*/
public Builder clearBlockId() {
bitField0_ = (bitField0_ & ~0x00000001);
blockId_ = 0L;
onChanged();
return this;
}
private java.lang.Object sourceHost_ = "";
/**
*
* TODO(calvin): source host and port should be replace with WorkerNetAddress
*
*
* optional string source_host = 2;
* @return Whether the sourceHost field is set.
*/
public boolean hasSourceHost() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* TODO(calvin): source host and port should be replace with WorkerNetAddress
*
*
* optional string source_host = 2;
* @return The sourceHost.
*/
public java.lang.String getSourceHost() {
java.lang.Object ref = sourceHost_;
if (!(ref instanceof java.lang.String)) {
alluxio.shaded.client.com.google.protobuf.ByteString bs =
(alluxio.shaded.client.com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
sourceHost_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* TODO(calvin): source host and port should be replace with WorkerNetAddress
*
*
* optional string source_host = 2;
* @return The bytes for sourceHost.
*/
public alluxio.shaded.client.com.google.protobuf.ByteString
getSourceHostBytes() {
java.lang.Object ref = sourceHost_;
if (ref instanceof String) {
alluxio.shaded.client.com.google.protobuf.ByteString b =
alluxio.shaded.client.com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sourceHost_ = b;
return b;
} else {
return (alluxio.shaded.client.com.google.protobuf.ByteString) ref;
}
}
/**
*
* TODO(calvin): source host and port should be replace with WorkerNetAddress
*
*
* optional string source_host = 2;
* @param value The sourceHost to set.
* @return This builder for chaining.
*/
public Builder setSourceHost(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
sourceHost_ = value;
onChanged();
return this;
}
/**
*
* TODO(calvin): source host and port should be replace with WorkerNetAddress
*
*
* optional string source_host = 2;
* @return This builder for chaining.
*/
public Builder clearSourceHost() {
bitField0_ = (bitField0_ & ~0x00000002);
sourceHost_ = getDefaultInstance().getSourceHost();
onChanged();
return this;
}
/**
*
* TODO(calvin): source host and port should be replace with WorkerNetAddress
*
*
* optional string source_host = 2;
* @param value The bytes for sourceHost to set.
* @return This builder for chaining.
*/
public Builder setSourceHostBytes(
alluxio.shaded.client.com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
sourceHost_ = value;
onChanged();
return this;
}
private int sourcePort_ ;
/**
* optional int32 source_port = 3;
* @return Whether the sourcePort field is set.
*/
@java.lang.Override
public boolean hasSourcePort() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional int32 source_port = 3;
* @return The sourcePort.
*/
@java.lang.Override
public int getSourcePort() {
return sourcePort_;
}
/**
* optional int32 source_port = 3;
* @param value The sourcePort to set.
* @return This builder for chaining.
*/
public Builder setSourcePort(int value) {
bitField0_ |= 0x00000004;
sourcePort_ = value;
onChanged();
return this;
}
/**
* optional int32 source_port = 3;
* @return This builder for chaining.
*/
public Builder clearSourcePort() {
bitField0_ = (bitField0_ & ~0x00000004);
sourcePort_ = 0;
onChanged();
return this;
}
private alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions openUfsBlockOptions_;
private alluxio.shaded.client.com.google.protobuf.SingleFieldBuilderV3<
alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions, alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions.Builder, alluxio.proto.dataserver.Protocol.OpenUfsBlockOptionsOrBuilder> openUfsBlockOptionsBuilder_;
/**
* optional .alluxio.proto.dataserver.OpenUfsBlockOptions open_ufs_block_options = 4;
* @return Whether the openUfsBlockOptions field is set.
*/
public boolean hasOpenUfsBlockOptions() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .alluxio.proto.dataserver.OpenUfsBlockOptions open_ufs_block_options = 4;
* @return The openUfsBlockOptions.
*/
public alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions getOpenUfsBlockOptions() {
if (openUfsBlockOptionsBuilder_ == null) {
return openUfsBlockOptions_ == null ? alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions.getDefaultInstance() : openUfsBlockOptions_;
} else {
return openUfsBlockOptionsBuilder_.getMessage();
}
}
/**
* optional .alluxio.proto.dataserver.OpenUfsBlockOptions open_ufs_block_options = 4;
*/
public Builder setOpenUfsBlockOptions(alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions value) {
if (openUfsBlockOptionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
openUfsBlockOptions_ = value;
onChanged();
} else {
openUfsBlockOptionsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .alluxio.proto.dataserver.OpenUfsBlockOptions open_ufs_block_options = 4;
*/
public Builder setOpenUfsBlockOptions(
alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions.Builder builderForValue) {
if (openUfsBlockOptionsBuilder_ == null) {
openUfsBlockOptions_ = builderForValue.build();
onChanged();
} else {
openUfsBlockOptionsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .alluxio.proto.dataserver.OpenUfsBlockOptions open_ufs_block_options = 4;
*/
public Builder mergeOpenUfsBlockOptions(alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions value) {
if (openUfsBlockOptionsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
openUfsBlockOptions_ != null &&
openUfsBlockOptions_ != alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions.getDefaultInstance()) {
openUfsBlockOptions_ =
alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions.newBuilder(openUfsBlockOptions_).mergeFrom(value).buildPartial();
} else {
openUfsBlockOptions_ = value;
}
onChanged();
} else {
openUfsBlockOptionsBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .alluxio.proto.dataserver.OpenUfsBlockOptions open_ufs_block_options = 4;
*/
public Builder clearOpenUfsBlockOptions() {
if (openUfsBlockOptionsBuilder_ == null) {
openUfsBlockOptions_ = null;
onChanged();
} else {
openUfsBlockOptionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* optional .alluxio.proto.dataserver.OpenUfsBlockOptions open_ufs_block_options = 4;
*/
public alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions.Builder getOpenUfsBlockOptionsBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getOpenUfsBlockOptionsFieldBuilder().getBuilder();
}
/**
* optional .alluxio.proto.dataserver.OpenUfsBlockOptions open_ufs_block_options = 4;
*/
public alluxio.proto.dataserver.Protocol.OpenUfsBlockOptionsOrBuilder getOpenUfsBlockOptionsOrBuilder() {
if (openUfsBlockOptionsBuilder_ != null) {
return openUfsBlockOptionsBuilder_.getMessageOrBuilder();
} else {
return openUfsBlockOptions_ == null ?
alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions.getDefaultInstance() : openUfsBlockOptions_;
}
}
/**
* optional .alluxio.proto.dataserver.OpenUfsBlockOptions open_ufs_block_options = 4;
*/
private alluxio.shaded.client.com.google.protobuf.SingleFieldBuilderV3<
alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions, alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions.Builder, alluxio.proto.dataserver.Protocol.OpenUfsBlockOptionsOrBuilder>
getOpenUfsBlockOptionsFieldBuilder() {
if (openUfsBlockOptionsBuilder_ == null) {
openUfsBlockOptionsBuilder_ = new alluxio.shaded.client.com.google.protobuf.SingleFieldBuilderV3<
alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions, alluxio.proto.dataserver.Protocol.OpenUfsBlockOptions.Builder, alluxio.proto.dataserver.Protocol.OpenUfsBlockOptionsOrBuilder>(
getOpenUfsBlockOptions(),
getParentForChildren(),
isClean());
openUfsBlockOptions_ = null;
}
return openUfsBlockOptionsBuilder_;
}
private long length_ ;
/**
* optional int64 length = 5;
* @return Whether the length field is set.
*/
@java.lang.Override
public boolean hasLength() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional int64 length = 5;
* @return The length.
*/
@java.lang.Override
public long getLength() {
return length_;
}
/**
* optional int64 length = 5;
* @param value The length to set.
* @return This builder for chaining.
*/
public Builder setLength(long value) {
bitField0_ |= 0x00000010;
length_ = value;
onChanged();
return this;
}
/**
* optional int64 length = 5;
* @return This builder for chaining.
*/
public Builder clearLength() {
bitField0_ = (bitField0_ & ~0x00000010);
length_ = 0L;
onChanged();
return this;
}
private boolean async_ ;
/**
* optional bool async = 6;
* @return Whether the async field is set.
*/
@java.lang.Override
public boolean hasAsync() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional bool async = 6;
* @return The async.
*/
@java.lang.Override
public boolean getAsync() {
return async_;
}
/**
* optional bool async = 6;
* @param value The async to set.
* @return This builder for chaining.
*/
public Builder setAsync(boolean value) {
bitField0_ |= 0x00000020;
async_ = value;
onChanged();
return this;
}
/**
* optional bool async = 6;
* @return This builder for chaining.
*/
public Builder clearAsync() {
bitField0_ = (bitField0_ & ~0x00000020);
async_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final alluxio.shaded.client.com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final alluxio.shaded.client.com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:alluxio.grpc.block.CacheRequest)
}
// @@protoc_insertion_point(class_scope:alluxio.grpc.block.CacheRequest)
private static final alluxio.grpc.CacheRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new alluxio.grpc.CacheRequest();
}
public static alluxio.grpc.CacheRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final alluxio.shaded.client.com.google.protobuf.Parser
PARSER = new alluxio.shaded.client.com.google.protobuf.AbstractParser() {
@java.lang.Override
public CacheRequest parsePartialFrom(
alluxio.shaded.client.com.google.protobuf.CodedInputStream input,
alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (alluxio.shaded.client.com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.alluxio.shaded.client.io.IOException e) {
throw new alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static alluxio.shaded.client.com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public alluxio.shaded.client.com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public alluxio.grpc.CacheRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}