Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
*
* NONE = 0;
*/
public static final int NONE_VALUE = 0;
/**
*
* space quota is exhausted
*
*
* NOSPACE = 1;
*/
public static final int NOSPACE_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static AlarmType valueOf(int value) {
return forNumber(value);
}
public static AlarmType forNumber(int value) {
switch (value) {
case 0: return NONE;
case 1: return NOSPACE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
AlarmType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public AlarmType findValueByNumber(int number) {
return AlarmType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return etcdserverpb.Rpc.getDescriptor().getEnumTypes().get(0);
}
private static final AlarmType[] VALUES = values();
public static AlarmType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private AlarmType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:etcdserverpb.AlarmType)
}
public interface ResponseHeaderOrBuilder extends
// @@protoc_insertion_point(interface_extends:etcdserverpb.ResponseHeader)
com.google.protobuf.MessageOrBuilder {
/**
*
* cluster_id is the ID of the cluster which sent the response.
*
* raft_term is the raft term when the request was applied.
*
*
* uint64 raft_term = 4;
*/
long getRaftTerm();
}
/**
* Protobuf type {@code etcdserverpb.ResponseHeader}
*/
public static final class ResponseHeader extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.ResponseHeader)
ResponseHeaderOrBuilder {
private static final long serialVersionUID = 0L;
// Use ResponseHeader.newBuilder() to construct.
private ResponseHeader(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ResponseHeader() {
clusterId_ = 0L;
memberId_ = 0L;
revision_ = 0L;
raftTerm_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ResponseHeader(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
clusterId_ = input.readUInt64();
break;
}
case 16: {
memberId_ = input.readUInt64();
break;
}
case 24: {
revision_ = input.readInt64();
break;
}
case 32: {
raftTerm_ = input.readUInt64();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_ResponseHeader_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_ResponseHeader_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.ResponseHeader.class, etcdserverpb.Rpc.ResponseHeader.Builder.class);
}
public static final int CLUSTER_ID_FIELD_NUMBER = 1;
private long clusterId_;
/**
*
* cluster_id is the ID of the cluster which sent the response.
*
*
* uint64 cluster_id = 1;
*/
public long getClusterId() {
return clusterId_;
}
public static final int MEMBER_ID_FIELD_NUMBER = 2;
private long memberId_;
/**
*
* member_id is the ID of the member which sent the response.
*
*
* uint64 member_id = 2;
*/
public long getMemberId() {
return memberId_;
}
public static final int REVISION_FIELD_NUMBER = 3;
private long revision_;
/**
*
* revision is the key-value store revision when the request was applied.
*
*
* int64 revision = 3;
*/
public long getRevision() {
return revision_;
}
public static final int RAFT_TERM_FIELD_NUMBER = 4;
private long raftTerm_;
/**
*
* raft_term is the raft term when the request was applied.
*
*
* uint64 raft_term = 4;
*/
public long getRaftTerm() {
return raftTerm_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (clusterId_ != 0L) {
output.writeUInt64(1, clusterId_);
}
if (memberId_ != 0L) {
output.writeUInt64(2, memberId_);
}
if (revision_ != 0L) {
output.writeInt64(3, revision_);
}
if (raftTerm_ != 0L) {
output.writeUInt64(4, raftTerm_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (clusterId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, clusterId_);
}
if (memberId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, memberId_);
}
if (revision_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, revision_);
}
if (raftTerm_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, raftTerm_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof etcdserverpb.Rpc.ResponseHeader)) {
return super.equals(obj);
}
etcdserverpb.Rpc.ResponseHeader other = (etcdserverpb.Rpc.ResponseHeader) obj;
boolean result = true;
result = result && (getClusterId()
== other.getClusterId());
result = result && (getMemberId()
== other.getMemberId());
result = result && (getRevision()
== other.getRevision());
result = result && (getRaftTerm()
== other.getRaftTerm());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getClusterId());
hash = (37 * hash) + MEMBER_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMemberId());
hash = (37 * hash) + REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRevision());
hash = (37 * hash) + RAFT_TERM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRaftTerm());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static etcdserverpb.Rpc.ResponseHeader parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.ResponseHeader parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.ResponseHeader parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.ResponseHeader parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.ResponseHeader parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.ResponseHeader parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.ResponseHeader parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.ResponseHeader parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.ResponseHeader parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.ResponseHeader parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.ResponseHeader parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.ResponseHeader parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(etcdserverpb.Rpc.ResponseHeader prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code etcdserverpb.ResponseHeader}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.ResponseHeader)
etcdserverpb.Rpc.ResponseHeaderOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_ResponseHeader_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_ResponseHeader_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.ResponseHeader.class, etcdserverpb.Rpc.ResponseHeader.Builder.class);
}
// Construct using etcdserverpb.Rpc.ResponseHeader.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
clusterId_ = 0L;
memberId_ = 0L;
revision_ = 0L;
raftTerm_ = 0L;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_ResponseHeader_descriptor;
}
public etcdserverpb.Rpc.ResponseHeader getDefaultInstanceForType() {
return etcdserverpb.Rpc.ResponseHeader.getDefaultInstance();
}
public etcdserverpb.Rpc.ResponseHeader build() {
etcdserverpb.Rpc.ResponseHeader result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public etcdserverpb.Rpc.ResponseHeader buildPartial() {
etcdserverpb.Rpc.ResponseHeader result = new etcdserverpb.Rpc.ResponseHeader(this);
result.clusterId_ = clusterId_;
result.memberId_ = memberId_;
result.revision_ = revision_;
result.raftTerm_ = raftTerm_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof etcdserverpb.Rpc.ResponseHeader) {
return mergeFrom((etcdserverpb.Rpc.ResponseHeader)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(etcdserverpb.Rpc.ResponseHeader other) {
if (other == etcdserverpb.Rpc.ResponseHeader.getDefaultInstance()) return this;
if (other.getClusterId() != 0L) {
setClusterId(other.getClusterId());
}
if (other.getMemberId() != 0L) {
setMemberId(other.getMemberId());
}
if (other.getRevision() != 0L) {
setRevision(other.getRevision());
}
if (other.getRaftTerm() != 0L) {
setRaftTerm(other.getRaftTerm());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
etcdserverpb.Rpc.ResponseHeader parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (etcdserverpb.Rpc.ResponseHeader) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long clusterId_ ;
/**
*
* cluster_id is the ID of the cluster which sent the response.
*
*
* uint64 cluster_id = 1;
*/
public long getClusterId() {
return clusterId_;
}
/**
*
* cluster_id is the ID of the cluster which sent the response.
*
* range_end is the upper bound on the requested range [key, range_end).
* If range_end is '\0', the range is all keys >= key.
* If range_end is key plus one (e.g., "aa"+1 == "ab", "a\xff"+1 == "b"),
* then the range request gets all keys prefixed with key.
* If both key and range_end are '\0', then the range request returns all keys.
*
* limit is a limit on the number of keys returned for the request. When limit is set to 0,
* it is treated as no limit.
*
*
* int64 limit = 3;
*/
long getLimit();
/**
*
* revision is the point-in-time of the key-value store to use for the range.
* If revision is less or equal to zero, the range is over the newest key-value store.
* If the revision has been compacted, ErrCompacted is returned as a response.
*
* serializable sets the range request to use serializable member-local reads.
* Range requests are linearizable by default; linearizable requests have higher
* latency and lower throughput than serializable requests but reflect the current
* consensus of the cluster. For better performance, in exchange for possible stale reads,
* a serializable range request is served locally without needing to reach consensus
* with other nodes in the cluster.
*
*
* NONE = 0;
*/
public static final int NONE_VALUE = 0;
/**
*
* lowest target value first
*
*
* ASCEND = 1;
*/
public static final int ASCEND_VALUE = 1;
/**
*
* highest target value first
*
*
* DESCEND = 2;
*/
public static final int DESCEND_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SortOrder valueOf(int value) {
return forNumber(value);
}
public static SortOrder forNumber(int value) {
switch (value) {
case 0: return NONE;
case 1: return ASCEND;
case 2: return DESCEND;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
SortOrder> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public SortOrder findValueByNumber(int number) {
return SortOrder.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return etcdserverpb.Rpc.RangeRequest.getDescriptor().getEnumTypes().get(0);
}
private static final SortOrder[] VALUES = values();
public static SortOrder valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private SortOrder(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:etcdserverpb.RangeRequest.SortOrder)
}
/**
* Protobuf enum {@code etcdserverpb.RangeRequest.SortTarget}
*/
public enum SortTarget
implements com.google.protobuf.ProtocolMessageEnum {
/**
* KEY = 0;
*/
KEY(0),
/**
* VERSION = 1;
*/
VERSION(1),
/**
* CREATE = 2;
*/
CREATE(2),
/**
* MOD = 3;
*/
MOD(3),
/**
* VALUE = 4;
*/
VALUE(4),
UNRECOGNIZED(-1),
;
/**
* KEY = 0;
*/
public static final int KEY_VALUE = 0;
/**
* VERSION = 1;
*/
public static final int VERSION_VALUE = 1;
/**
* CREATE = 2;
*/
public static final int CREATE_VALUE = 2;
/**
* MOD = 3;
*/
public static final int MOD_VALUE = 3;
/**
* VALUE = 4;
*/
public static final int VALUE_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SortTarget valueOf(int value) {
return forNumber(value);
}
public static SortTarget forNumber(int value) {
switch (value) {
case 0: return KEY;
case 1: return VERSION;
case 2: return CREATE;
case 3: return MOD;
case 4: return VALUE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
SortTarget> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public SortTarget findValueByNumber(int number) {
return SortTarget.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return etcdserverpb.Rpc.RangeRequest.getDescriptor().getEnumTypes().get(1);
}
private static final SortTarget[] VALUES = values();
public static SortTarget valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private SortTarget(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:etcdserverpb.RangeRequest.SortTarget)
}
public static final int KEY_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString key_;
/**
*
* key is the first key for the range. If range_end is not given, the request only looks up key.
*
*
* bytes key = 1;
*/
public com.google.protobuf.ByteString getKey() {
return key_;
}
public static final int RANGE_END_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString rangeEnd_;
/**
*
* range_end is the upper bound on the requested range [key, range_end).
* If range_end is '\0', the range is all keys >= key.
* If range_end is key plus one (e.g., "aa"+1 == "ab", "a\xff"+1 == "b"),
* then the range request gets all keys prefixed with key.
* If both key and range_end are '\0', then the range request returns all keys.
*
*
* bytes range_end = 2;
*/
public com.google.protobuf.ByteString getRangeEnd() {
return rangeEnd_;
}
public static final int LIMIT_FIELD_NUMBER = 3;
private long limit_;
/**
*
* limit is a limit on the number of keys returned for the request. When limit is set to 0,
* it is treated as no limit.
*
*
* int64 limit = 3;
*/
public long getLimit() {
return limit_;
}
public static final int REVISION_FIELD_NUMBER = 4;
private long revision_;
/**
*
* revision is the point-in-time of the key-value store to use for the range.
* If revision is less or equal to zero, the range is over the newest key-value store.
* If the revision has been compacted, ErrCompacted is returned as a response.
*
*
* int64 revision = 4;
*/
public long getRevision() {
return revision_;
}
public static final int SORT_ORDER_FIELD_NUMBER = 5;
private int sortOrder_;
/**
*
* sort_order is the order for returned sorted results.
*
*
* .etcdserverpb.RangeRequest.SortOrder sort_order = 5;
*/
public int getSortOrderValue() {
return sortOrder_;
}
/**
*
* sort_order is the order for returned sorted results.
*
*
* .etcdserverpb.RangeRequest.SortOrder sort_order = 5;
*/
public etcdserverpb.Rpc.RangeRequest.SortOrder getSortOrder() {
etcdserverpb.Rpc.RangeRequest.SortOrder result = etcdserverpb.Rpc.RangeRequest.SortOrder.valueOf(sortOrder_);
return result == null ? etcdserverpb.Rpc.RangeRequest.SortOrder.UNRECOGNIZED : result;
}
public static final int SORT_TARGET_FIELD_NUMBER = 6;
private int sortTarget_;
/**
*
* sort_target is the key-value field to use for sorting.
*
*
* .etcdserverpb.RangeRequest.SortTarget sort_target = 6;
*/
public int getSortTargetValue() {
return sortTarget_;
}
/**
*
* sort_target is the key-value field to use for sorting.
*
*
* .etcdserverpb.RangeRequest.SortTarget sort_target = 6;
*/
public etcdserverpb.Rpc.RangeRequest.SortTarget getSortTarget() {
etcdserverpb.Rpc.RangeRequest.SortTarget result = etcdserverpb.Rpc.RangeRequest.SortTarget.valueOf(sortTarget_);
return result == null ? etcdserverpb.Rpc.RangeRequest.SortTarget.UNRECOGNIZED : result;
}
public static final int SERIALIZABLE_FIELD_NUMBER = 7;
private boolean serializable_;
/**
*
* serializable sets the range request to use serializable member-local reads.
* Range requests are linearizable by default; linearizable requests have higher
* latency and lower throughput than serializable requests but reflect the current
* consensus of the cluster. For better performance, in exchange for possible stale reads,
* a serializable range request is served locally without needing to reach consensus
* with other nodes in the cluster.
*
*
* bool serializable = 7;
*/
public boolean getSerializable() {
return serializable_;
}
public static final int KEYS_ONLY_FIELD_NUMBER = 8;
private boolean keysOnly_;
/**
*
* keys_only when set returns only the keys and not the values.
*
*
* bool keys_only = 8;
*/
public boolean getKeysOnly() {
return keysOnly_;
}
public static final int COUNT_ONLY_FIELD_NUMBER = 9;
private boolean countOnly_;
/**
*
* count_only when set returns only the count of the keys in the range.
*
*
* bool count_only = 9;
*/
public boolean getCountOnly() {
return countOnly_;
}
public static final int MIN_MOD_REVISION_FIELD_NUMBER = 10;
private long minModRevision_;
/**
*
* min_mod_revision is the lower bound for returned key mod revisions; all keys with
* lesser mod revisions will be filtered away.
*
*
* int64 min_mod_revision = 10;
*/
public long getMinModRevision() {
return minModRevision_;
}
public static final int MAX_MOD_REVISION_FIELD_NUMBER = 11;
private long maxModRevision_;
/**
*
* max_mod_revision is the upper bound for returned key mod revisions; all keys with
* greater mod revisions will be filtered away.
*
*
* int64 max_mod_revision = 11;
*/
public long getMaxModRevision() {
return maxModRevision_;
}
public static final int MIN_CREATE_REVISION_FIELD_NUMBER = 12;
private long minCreateRevision_;
/**
*
* min_create_revision is the lower bound for returned key create revisions; all keys with
* lesser create trevisions will be filtered away.
*
*
* int64 min_create_revision = 12;
*/
public long getMinCreateRevision() {
return minCreateRevision_;
}
public static final int MAX_CREATE_REVISION_FIELD_NUMBER = 13;
private long maxCreateRevision_;
/**
*
* max_create_revision is the upper bound for returned key create revisions; all keys with
* greater create revisions will be filtered away.
*
*
* int64 max_create_revision = 13;
*/
public long getMaxCreateRevision() {
return maxCreateRevision_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!key_.isEmpty()) {
output.writeBytes(1, key_);
}
if (!rangeEnd_.isEmpty()) {
output.writeBytes(2, rangeEnd_);
}
if (limit_ != 0L) {
output.writeInt64(3, limit_);
}
if (revision_ != 0L) {
output.writeInt64(4, revision_);
}
if (sortOrder_ != etcdserverpb.Rpc.RangeRequest.SortOrder.NONE.getNumber()) {
output.writeEnum(5, sortOrder_);
}
if (sortTarget_ != etcdserverpb.Rpc.RangeRequest.SortTarget.KEY.getNumber()) {
output.writeEnum(6, sortTarget_);
}
if (serializable_ != false) {
output.writeBool(7, serializable_);
}
if (keysOnly_ != false) {
output.writeBool(8, keysOnly_);
}
if (countOnly_ != false) {
output.writeBool(9, countOnly_);
}
if (minModRevision_ != 0L) {
output.writeInt64(10, minModRevision_);
}
if (maxModRevision_ != 0L) {
output.writeInt64(11, maxModRevision_);
}
if (minCreateRevision_ != 0L) {
output.writeInt64(12, minCreateRevision_);
}
if (maxCreateRevision_ != 0L) {
output.writeInt64(13, maxCreateRevision_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!key_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, key_);
}
if (!rangeEnd_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, rangeEnd_);
}
if (limit_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, limit_);
}
if (revision_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(4, revision_);
}
if (sortOrder_ != etcdserverpb.Rpc.RangeRequest.SortOrder.NONE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, sortOrder_);
}
if (sortTarget_ != etcdserverpb.Rpc.RangeRequest.SortTarget.KEY.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, sortTarget_);
}
if (serializable_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, serializable_);
}
if (keysOnly_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(8, keysOnly_);
}
if (countOnly_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(9, countOnly_);
}
if (minModRevision_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(10, minModRevision_);
}
if (maxModRevision_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(11, maxModRevision_);
}
if (minCreateRevision_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(12, minCreateRevision_);
}
if (maxCreateRevision_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(13, maxCreateRevision_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof etcdserverpb.Rpc.RangeRequest)) {
return super.equals(obj);
}
etcdserverpb.Rpc.RangeRequest other = (etcdserverpb.Rpc.RangeRequest) obj;
boolean result = true;
result = result && getKey()
.equals(other.getKey());
result = result && getRangeEnd()
.equals(other.getRangeEnd());
result = result && (getLimit()
== other.getLimit());
result = result && (getRevision()
== other.getRevision());
result = result && sortOrder_ == other.sortOrder_;
result = result && sortTarget_ == other.sortTarget_;
result = result && (getSerializable()
== other.getSerializable());
result = result && (getKeysOnly()
== other.getKeysOnly());
result = result && (getCountOnly()
== other.getCountOnly());
result = result && (getMinModRevision()
== other.getMinModRevision());
result = result && (getMaxModRevision()
== other.getMaxModRevision());
result = result && (getMinCreateRevision()
== other.getMinCreateRevision());
result = result && (getMaxCreateRevision()
== other.getMaxCreateRevision());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + RANGE_END_FIELD_NUMBER;
hash = (53 * hash) + getRangeEnd().hashCode();
hash = (37 * hash) + LIMIT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLimit());
hash = (37 * hash) + REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRevision());
hash = (37 * hash) + SORT_ORDER_FIELD_NUMBER;
hash = (53 * hash) + sortOrder_;
hash = (37 * hash) + SORT_TARGET_FIELD_NUMBER;
hash = (53 * hash) + sortTarget_;
hash = (37 * hash) + SERIALIZABLE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSerializable());
hash = (37 * hash) + KEYS_ONLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getKeysOnly());
hash = (37 * hash) + COUNT_ONLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getCountOnly());
hash = (37 * hash) + MIN_MOD_REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMinModRevision());
hash = (37 * hash) + MAX_MOD_REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxModRevision());
hash = (37 * hash) + MIN_CREATE_REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMinCreateRevision());
hash = (37 * hash) + MAX_CREATE_REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxCreateRevision());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static etcdserverpb.Rpc.RangeRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.RangeRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.RangeRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.RangeRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.RangeRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.RangeRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.RangeRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.RangeRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.RangeRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.RangeRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.RangeRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.RangeRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(etcdserverpb.Rpc.RangeRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code etcdserverpb.RangeRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.RangeRequest)
etcdserverpb.Rpc.RangeRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_RangeRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_RangeRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.RangeRequest.class, etcdserverpb.Rpc.RangeRequest.Builder.class);
}
// Construct using etcdserverpb.Rpc.RangeRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
key_ = com.google.protobuf.ByteString.EMPTY;
rangeEnd_ = com.google.protobuf.ByteString.EMPTY;
limit_ = 0L;
revision_ = 0L;
sortOrder_ = 0;
sortTarget_ = 0;
serializable_ = false;
keysOnly_ = false;
countOnly_ = false;
minModRevision_ = 0L;
maxModRevision_ = 0L;
minCreateRevision_ = 0L;
maxCreateRevision_ = 0L;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_RangeRequest_descriptor;
}
public etcdserverpb.Rpc.RangeRequest getDefaultInstanceForType() {
return etcdserverpb.Rpc.RangeRequest.getDefaultInstance();
}
public etcdserverpb.Rpc.RangeRequest build() {
etcdserverpb.Rpc.RangeRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public etcdserverpb.Rpc.RangeRequest buildPartial() {
etcdserverpb.Rpc.RangeRequest result = new etcdserverpb.Rpc.RangeRequest(this);
result.key_ = key_;
result.rangeEnd_ = rangeEnd_;
result.limit_ = limit_;
result.revision_ = revision_;
result.sortOrder_ = sortOrder_;
result.sortTarget_ = sortTarget_;
result.serializable_ = serializable_;
result.keysOnly_ = keysOnly_;
result.countOnly_ = countOnly_;
result.minModRevision_ = minModRevision_;
result.maxModRevision_ = maxModRevision_;
result.minCreateRevision_ = minCreateRevision_;
result.maxCreateRevision_ = maxCreateRevision_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof etcdserverpb.Rpc.RangeRequest) {
return mergeFrom((etcdserverpb.Rpc.RangeRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(etcdserverpb.Rpc.RangeRequest other) {
if (other == etcdserverpb.Rpc.RangeRequest.getDefaultInstance()) return this;
if (other.getKey() != com.google.protobuf.ByteString.EMPTY) {
setKey(other.getKey());
}
if (other.getRangeEnd() != com.google.protobuf.ByteString.EMPTY) {
setRangeEnd(other.getRangeEnd());
}
if (other.getLimit() != 0L) {
setLimit(other.getLimit());
}
if (other.getRevision() != 0L) {
setRevision(other.getRevision());
}
if (other.sortOrder_ != 0) {
setSortOrderValue(other.getSortOrderValue());
}
if (other.sortTarget_ != 0) {
setSortTargetValue(other.getSortTargetValue());
}
if (other.getSerializable() != false) {
setSerializable(other.getSerializable());
}
if (other.getKeysOnly() != false) {
setKeysOnly(other.getKeysOnly());
}
if (other.getCountOnly() != false) {
setCountOnly(other.getCountOnly());
}
if (other.getMinModRevision() != 0L) {
setMinModRevision(other.getMinModRevision());
}
if (other.getMaxModRevision() != 0L) {
setMaxModRevision(other.getMaxModRevision());
}
if (other.getMinCreateRevision() != 0L) {
setMinCreateRevision(other.getMinCreateRevision());
}
if (other.getMaxCreateRevision() != 0L) {
setMaxCreateRevision(other.getMaxCreateRevision());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
etcdserverpb.Rpc.RangeRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (etcdserverpb.Rpc.RangeRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* key is the first key for the range. If range_end is not given, the request only looks up key.
*
* range_end is the upper bound on the requested range [key, range_end).
* If range_end is '\0', the range is all keys >= key.
* If range_end is key plus one (e.g., "aa"+1 == "ab", "a\xff"+1 == "b"),
* then the range request gets all keys prefixed with key.
* If both key and range_end are '\0', then the range request returns all keys.
*
* range_end is the upper bound on the requested range [key, range_end).
* If range_end is '\0', the range is all keys >= key.
* If range_end is key plus one (e.g., "aa"+1 == "ab", "a\xff"+1 == "b"),
* then the range request gets all keys prefixed with key.
* If both key and range_end are '\0', then the range request returns all keys.
*
*
* bytes range_end = 2;
*/
public Builder setRangeEnd(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
rangeEnd_ = value;
onChanged();
return this;
}
/**
*
* range_end is the upper bound on the requested range [key, range_end).
* If range_end is '\0', the range is all keys >= key.
* If range_end is key plus one (e.g., "aa"+1 == "ab", "a\xff"+1 == "b"),
* then the range request gets all keys prefixed with key.
* If both key and range_end are '\0', then the range request returns all keys.
*
* revision is the point-in-time of the key-value store to use for the range.
* If revision is less or equal to zero, the range is over the newest key-value store.
* If the revision has been compacted, ErrCompacted is returned as a response.
*
*
* int64 revision = 4;
*/
public long getRevision() {
return revision_;
}
/**
*
* revision is the point-in-time of the key-value store to use for the range.
* If revision is less or equal to zero, the range is over the newest key-value store.
* If the revision has been compacted, ErrCompacted is returned as a response.
*
* revision is the point-in-time of the key-value store to use for the range.
* If revision is less or equal to zero, the range is over the newest key-value store.
* If the revision has been compacted, ErrCompacted is returned as a response.
*
* serializable sets the range request to use serializable member-local reads.
* Range requests are linearizable by default; linearizable requests have higher
* latency and lower throughput than serializable requests but reflect the current
* consensus of the cluster. For better performance, in exchange for possible stale reads,
* a serializable range request is served locally without needing to reach consensus
* with other nodes in the cluster.
*
* serializable sets the range request to use serializable member-local reads.
* Range requests are linearizable by default; linearizable requests have higher
* latency and lower throughput than serializable requests but reflect the current
* consensus of the cluster. For better performance, in exchange for possible stale reads,
* a serializable range request is served locally without needing to reach consensus
* with other nodes in the cluster.
*
* serializable sets the range request to use serializable member-local reads.
* Range requests are linearizable by default; linearizable requests have higher
* latency and lower throughput than serializable requests but reflect the current
* consensus of the cluster. For better performance, in exchange for possible stale reads,
* a serializable range request is served locally without needing to reach consensus
* with other nodes in the cluster.
*
* If ignore_lease is set, etcd updates the key using its current lease.
* Returns an error if the key does not exist.
*
*
* bool ignore_lease = 6;
*/
boolean getIgnoreLease();
}
/**
* Protobuf type {@code etcdserverpb.PutRequest}
*/
public static final class PutRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.PutRequest)
PutRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use PutRequest.newBuilder() to construct.
private PutRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PutRequest() {
key_ = com.google.protobuf.ByteString.EMPTY;
value_ = com.google.protobuf.ByteString.EMPTY;
lease_ = 0L;
prevKv_ = false;
ignoreValue_ = false;
ignoreLease_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PutRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
key_ = input.readBytes();
break;
}
case 18: {
value_ = input.readBytes();
break;
}
case 24: {
lease_ = input.readInt64();
break;
}
case 32: {
prevKv_ = input.readBool();
break;
}
case 40: {
ignoreValue_ = input.readBool();
break;
}
case 48: {
ignoreLease_ = input.readBool();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_PutRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_PutRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.PutRequest.class, etcdserverpb.Rpc.PutRequest.Builder.class);
}
public static final int KEY_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString key_;
/**
*
* key is the key, in bytes, to put into the key-value store.
*
*
* bytes key = 1;
*/
public com.google.protobuf.ByteString getKey() {
return key_;
}
public static final int VALUE_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString value_;
/**
*
* value is the value, in bytes, to associate with the key in the key-value store.
*
*
* bytes value = 2;
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
public static final int LEASE_FIELD_NUMBER = 3;
private long lease_;
/**
*
* lease is the lease ID to associate with the key in the key-value store. A lease
* value of 0 indicates no lease.
*
*
* int64 lease = 3;
*/
public long getLease() {
return lease_;
}
public static final int PREV_KV_FIELD_NUMBER = 4;
private boolean prevKv_;
/**
*
* If prev_kv is set, etcd gets the previous key-value pair before changing it.
* The previous key-value pair will be returned in the put response.
*
*
* bool prev_kv = 4;
*/
public boolean getPrevKv() {
return prevKv_;
}
public static final int IGNORE_VALUE_FIELD_NUMBER = 5;
private boolean ignoreValue_;
/**
*
* If ignore_value is set, etcd updates the key using its current value.
* Returns an error if the key does not exist.
*
*
* bool ignore_value = 5;
*/
public boolean getIgnoreValue() {
return ignoreValue_;
}
public static final int IGNORE_LEASE_FIELD_NUMBER = 6;
private boolean ignoreLease_;
/**
*
* If ignore_lease is set, etcd updates the key using its current lease.
* Returns an error if the key does not exist.
*
*
* bool ignore_lease = 6;
*/
public boolean getIgnoreLease() {
return ignoreLease_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!key_.isEmpty()) {
output.writeBytes(1, key_);
}
if (!value_.isEmpty()) {
output.writeBytes(2, value_);
}
if (lease_ != 0L) {
output.writeInt64(3, lease_);
}
if (prevKv_ != false) {
output.writeBool(4, prevKv_);
}
if (ignoreValue_ != false) {
output.writeBool(5, ignoreValue_);
}
if (ignoreLease_ != false) {
output.writeBool(6, ignoreLease_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!key_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, key_);
}
if (!value_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, value_);
}
if (lease_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, lease_);
}
if (prevKv_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, prevKv_);
}
if (ignoreValue_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, ignoreValue_);
}
if (ignoreLease_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, ignoreLease_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof etcdserverpb.Rpc.PutRequest)) {
return super.equals(obj);
}
etcdserverpb.Rpc.PutRequest other = (etcdserverpb.Rpc.PutRequest) obj;
boolean result = true;
result = result && getKey()
.equals(other.getKey());
result = result && getValue()
.equals(other.getValue());
result = result && (getLease()
== other.getLease());
result = result && (getPrevKv()
== other.getPrevKv());
result = result && (getIgnoreValue()
== other.getIgnoreValue());
result = result && (getIgnoreLease()
== other.getIgnoreLease());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
hash = (37 * hash) + LEASE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLease());
hash = (37 * hash) + PREV_KV_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getPrevKv());
hash = (37 * hash) + IGNORE_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIgnoreValue());
hash = (37 * hash) + IGNORE_LEASE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIgnoreLease());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static etcdserverpb.Rpc.PutRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.PutRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.PutRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.PutRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.PutRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.PutRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.PutRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.PutRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.PutRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.PutRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.PutRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.PutRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(etcdserverpb.Rpc.PutRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code etcdserverpb.PutRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.PutRequest)
etcdserverpb.Rpc.PutRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_PutRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_PutRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.PutRequest.class, etcdserverpb.Rpc.PutRequest.Builder.class);
}
// Construct using etcdserverpb.Rpc.PutRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
key_ = com.google.protobuf.ByteString.EMPTY;
value_ = com.google.protobuf.ByteString.EMPTY;
lease_ = 0L;
prevKv_ = false;
ignoreValue_ = false;
ignoreLease_ = false;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_PutRequest_descriptor;
}
public etcdserverpb.Rpc.PutRequest getDefaultInstanceForType() {
return etcdserverpb.Rpc.PutRequest.getDefaultInstance();
}
public etcdserverpb.Rpc.PutRequest build() {
etcdserverpb.Rpc.PutRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public etcdserverpb.Rpc.PutRequest buildPartial() {
etcdserverpb.Rpc.PutRequest result = new etcdserverpb.Rpc.PutRequest(this);
result.key_ = key_;
result.value_ = value_;
result.lease_ = lease_;
result.prevKv_ = prevKv_;
result.ignoreValue_ = ignoreValue_;
result.ignoreLease_ = ignoreLease_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof etcdserverpb.Rpc.PutRequest) {
return mergeFrom((etcdserverpb.Rpc.PutRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(etcdserverpb.Rpc.PutRequest other) {
if (other == etcdserverpb.Rpc.PutRequest.getDefaultInstance()) return this;
if (other.getKey() != com.google.protobuf.ByteString.EMPTY) {
setKey(other.getKey());
}
if (other.getValue() != com.google.protobuf.ByteString.EMPTY) {
setValue(other.getValue());
}
if (other.getLease() != 0L) {
setLease(other.getLease());
}
if (other.getPrevKv() != false) {
setPrevKv(other.getPrevKv());
}
if (other.getIgnoreValue() != false) {
setIgnoreValue(other.getIgnoreValue());
}
if (other.getIgnoreLease() != false) {
setIgnoreLease(other.getIgnoreLease());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
etcdserverpb.Rpc.PutRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (etcdserverpb.Rpc.PutRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* key is the key, in bytes, to put into the key-value store.
*
* range_end is the key following the last key to delete for the range [key, range_end).
* If range_end is not given, the range is defined to contain only the key argument.
* If range_end is one bit larger than the given key, then the range is all the keys
* with the prefix (the given key).
* If range_end is '\0', the range is all keys greater than or equal to the key argument.
*
* If prev_kv is set, etcd gets the previous key-value pairs before deleting it.
* The previous key-value pairs will be returned in the delete response.
*
*
* bool prev_kv = 3;
*/
boolean getPrevKv();
}
/**
* Protobuf type {@code etcdserverpb.DeleteRangeRequest}
*/
public static final class DeleteRangeRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.DeleteRangeRequest)
DeleteRangeRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use DeleteRangeRequest.newBuilder() to construct.
private DeleteRangeRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DeleteRangeRequest() {
key_ = com.google.protobuf.ByteString.EMPTY;
rangeEnd_ = com.google.protobuf.ByteString.EMPTY;
prevKv_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DeleteRangeRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
key_ = input.readBytes();
break;
}
case 18: {
rangeEnd_ = input.readBytes();
break;
}
case 24: {
prevKv_ = input.readBool();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_DeleteRangeRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_DeleteRangeRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.DeleteRangeRequest.class, etcdserverpb.Rpc.DeleteRangeRequest.Builder.class);
}
public static final int KEY_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString key_;
/**
*
* key is the first key to delete in the range.
*
*
* bytes key = 1;
*/
public com.google.protobuf.ByteString getKey() {
return key_;
}
public static final int RANGE_END_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString rangeEnd_;
/**
*
* range_end is the key following the last key to delete for the range [key, range_end).
* If range_end is not given, the range is defined to contain only the key argument.
* If range_end is one bit larger than the given key, then the range is all the keys
* with the prefix (the given key).
* If range_end is '\0', the range is all keys greater than or equal to the key argument.
*
*
* bytes range_end = 2;
*/
public com.google.protobuf.ByteString getRangeEnd() {
return rangeEnd_;
}
public static final int PREV_KV_FIELD_NUMBER = 3;
private boolean prevKv_;
/**
*
* If prev_kv is set, etcd gets the previous key-value pairs before deleting it.
* The previous key-value pairs will be returned in the delete response.
*
*
* bool prev_kv = 3;
*/
public boolean getPrevKv() {
return prevKv_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!key_.isEmpty()) {
output.writeBytes(1, key_);
}
if (!rangeEnd_.isEmpty()) {
output.writeBytes(2, rangeEnd_);
}
if (prevKv_ != false) {
output.writeBool(3, prevKv_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!key_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, key_);
}
if (!rangeEnd_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, rangeEnd_);
}
if (prevKv_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, prevKv_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof etcdserverpb.Rpc.DeleteRangeRequest)) {
return super.equals(obj);
}
etcdserverpb.Rpc.DeleteRangeRequest other = (etcdserverpb.Rpc.DeleteRangeRequest) obj;
boolean result = true;
result = result && getKey()
.equals(other.getKey());
result = result && getRangeEnd()
.equals(other.getRangeEnd());
result = result && (getPrevKv()
== other.getPrevKv());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + RANGE_END_FIELD_NUMBER;
hash = (53 * hash) + getRangeEnd().hashCode();
hash = (37 * hash) + PREV_KV_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getPrevKv());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static etcdserverpb.Rpc.DeleteRangeRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.DeleteRangeRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.DeleteRangeRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.DeleteRangeRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.DeleteRangeRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.DeleteRangeRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.DeleteRangeRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.DeleteRangeRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.DeleteRangeRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.DeleteRangeRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.DeleteRangeRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.DeleteRangeRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(etcdserverpb.Rpc.DeleteRangeRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code etcdserverpb.DeleteRangeRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.DeleteRangeRequest)
etcdserverpb.Rpc.DeleteRangeRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_DeleteRangeRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_DeleteRangeRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.DeleteRangeRequest.class, etcdserverpb.Rpc.DeleteRangeRequest.Builder.class);
}
// Construct using etcdserverpb.Rpc.DeleteRangeRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
key_ = com.google.protobuf.ByteString.EMPTY;
rangeEnd_ = com.google.protobuf.ByteString.EMPTY;
prevKv_ = false;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_DeleteRangeRequest_descriptor;
}
public etcdserverpb.Rpc.DeleteRangeRequest getDefaultInstanceForType() {
return etcdserverpb.Rpc.DeleteRangeRequest.getDefaultInstance();
}
public etcdserverpb.Rpc.DeleteRangeRequest build() {
etcdserverpb.Rpc.DeleteRangeRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public etcdserverpb.Rpc.DeleteRangeRequest buildPartial() {
etcdserverpb.Rpc.DeleteRangeRequest result = new etcdserverpb.Rpc.DeleteRangeRequest(this);
result.key_ = key_;
result.rangeEnd_ = rangeEnd_;
result.prevKv_ = prevKv_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof etcdserverpb.Rpc.DeleteRangeRequest) {
return mergeFrom((etcdserverpb.Rpc.DeleteRangeRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(etcdserverpb.Rpc.DeleteRangeRequest other) {
if (other == etcdserverpb.Rpc.DeleteRangeRequest.getDefaultInstance()) return this;
if (other.getKey() != com.google.protobuf.ByteString.EMPTY) {
setKey(other.getKey());
}
if (other.getRangeEnd() != com.google.protobuf.ByteString.EMPTY) {
setRangeEnd(other.getRangeEnd());
}
if (other.getPrevKv() != false) {
setPrevKv(other.getPrevKv());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
etcdserverpb.Rpc.DeleteRangeRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (etcdserverpb.Rpc.DeleteRangeRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* range_end is the key following the last key to delete for the range [key, range_end).
* If range_end is not given, the range is defined to contain only the key argument.
* If range_end is one bit larger than the given key, then the range is all the keys
* with the prefix (the given key).
* If range_end is '\0', the range is all keys greater than or equal to the key argument.
*
* range_end is the key following the last key to delete for the range [key, range_end).
* If range_end is not given, the range is defined to contain only the key argument.
* If range_end is one bit larger than the given key, then the range is all the keys
* with the prefix (the given key).
* If range_end is '\0', the range is all keys greater than or equal to the key argument.
*
*
* bytes range_end = 2;
*/
public Builder setRangeEnd(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
rangeEnd_ = value;
onChanged();
return this;
}
/**
*
* range_end is the key following the last key to delete for the range [key, range_end).
* If range_end is not given, the range is defined to contain only the key argument.
* If range_end is one bit larger than the given key, then the range is all the keys
* with the prefix (the given key).
* If range_end is '\0', the range is all keys greater than or equal to the key argument.
*
* If prev_kv is set, etcd gets the previous key-value pairs before deleting it.
* The previous key-value pairs will be returned in the delete response.
*
* If prev_kv is set, etcd gets the previous key-value pairs before deleting it.
* The previous key-value pairs will be returned in the delete response.
*
* If prev_kv is set, etcd gets the previous key-value pairs before deleting it.
* The previous key-value pairs will be returned in the delete response.
*
*
* bool prev_kv = 3;
*/
public Builder clearPrevKv() {
prevKv_ = false;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:etcdserverpb.DeleteRangeRequest)
}
// @@protoc_insertion_point(class_scope:etcdserverpb.DeleteRangeRequest)
private static final etcdserverpb.Rpc.DeleteRangeRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new etcdserverpb.Rpc.DeleteRangeRequest();
}
public static etcdserverpb.Rpc.DeleteRangeRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public DeleteRangeRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DeleteRangeRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public etcdserverpb.Rpc.DeleteRangeRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DeleteRangeResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:etcdserverpb.DeleteRangeResponse)
com.google.protobuf.MessageOrBuilder {
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
boolean hasHeader();
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
etcdserverpb.Rpc.ResponseHeader getHeader();
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
etcdserverpb.Rpc.ResponseHeaderOrBuilder getHeaderOrBuilder();
/**
*
* deleted is the number of keys deleted by the delete range request.
*
* range_end compares the given target to all keys in the range [key, range_end).
* See RangeRequest for more details on key ranges.
*
*
* bytes range_end = 8;
*/
com.google.protobuf.ByteString getRangeEnd();
public etcdserverpb.Rpc.Compare.TargetUnionCase getTargetUnionCase();
}
/**
* Protobuf type {@code etcdserverpb.Compare}
*/
public static final class Compare extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.Compare)
CompareOrBuilder {
private static final long serialVersionUID = 0L;
// Use Compare.newBuilder() to construct.
private Compare(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Compare() {
result_ = 0;
target_ = 0;
key_ = com.google.protobuf.ByteString.EMPTY;
rangeEnd_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Compare(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
result_ = rawValue;
break;
}
case 16: {
int rawValue = input.readEnum();
target_ = rawValue;
break;
}
case 26: {
key_ = input.readBytes();
break;
}
case 32: {
targetUnionCase_ = 4;
targetUnion_ = input.readInt64();
break;
}
case 40: {
targetUnionCase_ = 5;
targetUnion_ = input.readInt64();
break;
}
case 48: {
targetUnionCase_ = 6;
targetUnion_ = input.readInt64();
break;
}
case 58: {
targetUnionCase_ = 7;
targetUnion_ = input.readBytes();
break;
}
case 66: {
rangeEnd_ = 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).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_Compare_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_Compare_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.Compare.class, etcdserverpb.Rpc.Compare.Builder.class);
}
/**
* Protobuf enum {@code etcdserverpb.Compare.CompareResult}
*/
public enum CompareResult
implements com.google.protobuf.ProtocolMessageEnum {
/**
* EQUAL = 0;
*/
EQUAL(0),
/**
* GREATER = 1;
*/
GREATER(1),
/**
* LESS = 2;
*/
LESS(2),
/**
* NOT_EQUAL = 3;
*/
NOT_EQUAL(3),
UNRECOGNIZED(-1),
;
/**
* EQUAL = 0;
*/
public static final int EQUAL_VALUE = 0;
/**
* GREATER = 1;
*/
public static final int GREATER_VALUE = 1;
/**
* LESS = 2;
*/
public static final int LESS_VALUE = 2;
/**
* NOT_EQUAL = 3;
*/
public static final int NOT_EQUAL_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CompareResult valueOf(int value) {
return forNumber(value);
}
public static CompareResult forNumber(int value) {
switch (value) {
case 0: return EQUAL;
case 1: return GREATER;
case 2: return LESS;
case 3: return NOT_EQUAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
CompareResult> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public CompareResult findValueByNumber(int number) {
return CompareResult.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return etcdserverpb.Rpc.Compare.getDescriptor().getEnumTypes().get(0);
}
private static final CompareResult[] VALUES = values();
public static CompareResult valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private CompareResult(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:etcdserverpb.Compare.CompareResult)
}
/**
* Protobuf enum {@code etcdserverpb.Compare.CompareTarget}
*/
public enum CompareTarget
implements com.google.protobuf.ProtocolMessageEnum {
/**
* VERSION = 0;
*/
VERSION(0),
/**
* CREATE = 1;
*/
CREATE(1),
/**
* MOD = 2;
*/
MOD(2),
/**
* VALUE = 3;
*/
VALUE(3),
UNRECOGNIZED(-1),
;
/**
* VERSION = 0;
*/
public static final int VERSION_VALUE = 0;
/**
* CREATE = 1;
*/
public static final int CREATE_VALUE = 1;
/**
* MOD = 2;
*/
public static final int MOD_VALUE = 2;
/**
* VALUE = 3;
*/
public static final int VALUE_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CompareTarget valueOf(int value) {
return forNumber(value);
}
public static CompareTarget forNumber(int value) {
switch (value) {
case 0: return VERSION;
case 1: return CREATE;
case 2: return MOD;
case 3: return VALUE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
CompareTarget> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public CompareTarget findValueByNumber(int number) {
return CompareTarget.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return etcdserverpb.Rpc.Compare.getDescriptor().getEnumTypes().get(1);
}
private static final CompareTarget[] VALUES = values();
public static CompareTarget valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private CompareTarget(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:etcdserverpb.Compare.CompareTarget)
}
private int targetUnionCase_ = 0;
private java.lang.Object targetUnion_;
public enum TargetUnionCase
implements com.google.protobuf.Internal.EnumLite {
VERSION(4),
CREATE_REVISION(5),
MOD_REVISION(6),
VALUE(7),
TARGETUNION_NOT_SET(0);
private final int value;
private TargetUnionCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TargetUnionCase valueOf(int value) {
return forNumber(value);
}
public static TargetUnionCase forNumber(int value) {
switch (value) {
case 4: return VERSION;
case 5: return CREATE_REVISION;
case 6: return MOD_REVISION;
case 7: return VALUE;
case 0: return TARGETUNION_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public TargetUnionCase
getTargetUnionCase() {
return TargetUnionCase.forNumber(
targetUnionCase_);
}
public static final int RESULT_FIELD_NUMBER = 1;
private int result_;
/**
*
* result is logical comparison operation for this comparison.
*
*
* .etcdserverpb.Compare.CompareResult result = 1;
*/
public int getResultValue() {
return result_;
}
/**
*
* result is logical comparison operation for this comparison.
*
*
* .etcdserverpb.Compare.CompareResult result = 1;
*/
public etcdserverpb.Rpc.Compare.CompareResult getResult() {
etcdserverpb.Rpc.Compare.CompareResult result = etcdserverpb.Rpc.Compare.CompareResult.valueOf(result_);
return result == null ? etcdserverpb.Rpc.Compare.CompareResult.UNRECOGNIZED : result;
}
public static final int TARGET_FIELD_NUMBER = 2;
private int target_;
/**
*
* target is the key-value field to inspect for the comparison.
*
*
* .etcdserverpb.Compare.CompareTarget target = 2;
*/
public int getTargetValue() {
return target_;
}
/**
*
* target is the key-value field to inspect for the comparison.
*
*
* .etcdserverpb.Compare.CompareTarget target = 2;
*/
public etcdserverpb.Rpc.Compare.CompareTarget getTarget() {
etcdserverpb.Rpc.Compare.CompareTarget result = etcdserverpb.Rpc.Compare.CompareTarget.valueOf(target_);
return result == null ? etcdserverpb.Rpc.Compare.CompareTarget.UNRECOGNIZED : result;
}
public static final int KEY_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString key_;
/**
*
* key is the subject key for the comparison operation.
*
*
* bytes key = 3;
*/
public com.google.protobuf.ByteString getKey() {
return key_;
}
public static final int VERSION_FIELD_NUMBER = 4;
/**
*
* version is the version of the given key
*
*
* int64 version = 4;
*/
public long getVersion() {
if (targetUnionCase_ == 4) {
return (java.lang.Long) targetUnion_;
}
return 0L;
}
public static final int CREATE_REVISION_FIELD_NUMBER = 5;
/**
*
* create_revision is the creation revision of the given key
*
*
* int64 create_revision = 5;
*/
public long getCreateRevision() {
if (targetUnionCase_ == 5) {
return (java.lang.Long) targetUnion_;
}
return 0L;
}
public static final int MOD_REVISION_FIELD_NUMBER = 6;
/**
*
* mod_revision is the last modified revision of the given key.
*
*
* int64 mod_revision = 6;
*/
public long getModRevision() {
if (targetUnionCase_ == 6) {
return (java.lang.Long) targetUnion_;
}
return 0L;
}
public static final int VALUE_FIELD_NUMBER = 7;
/**
*
* value is the value of the given key, in bytes.
*
*
* bytes value = 7;
*/
public com.google.protobuf.ByteString getValue() {
if (targetUnionCase_ == 7) {
return (com.google.protobuf.ByteString) targetUnion_;
}
return com.google.protobuf.ByteString.EMPTY;
}
public static final int RANGE_END_FIELD_NUMBER = 8;
private com.google.protobuf.ByteString rangeEnd_;
/**
*
* range_end compares the given target to all keys in the range [key, range_end).
* See RangeRequest for more details on key ranges.
*
*
* bytes range_end = 8;
*/
public com.google.protobuf.ByteString getRangeEnd() {
return rangeEnd_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (result_ != etcdserverpb.Rpc.Compare.CompareResult.EQUAL.getNumber()) {
output.writeEnum(1, result_);
}
if (target_ != etcdserverpb.Rpc.Compare.CompareTarget.VERSION.getNumber()) {
output.writeEnum(2, target_);
}
if (!key_.isEmpty()) {
output.writeBytes(3, key_);
}
if (targetUnionCase_ == 4) {
output.writeInt64(
4, (long)((java.lang.Long) targetUnion_));
}
if (targetUnionCase_ == 5) {
output.writeInt64(
5, (long)((java.lang.Long) targetUnion_));
}
if (targetUnionCase_ == 6) {
output.writeInt64(
6, (long)((java.lang.Long) targetUnion_));
}
if (targetUnionCase_ == 7) {
output.writeBytes(
7, (com.google.protobuf.ByteString) targetUnion_);
}
if (!rangeEnd_.isEmpty()) {
output.writeBytes(8, rangeEnd_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (result_ != etcdserverpb.Rpc.Compare.CompareResult.EQUAL.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, result_);
}
if (target_ != etcdserverpb.Rpc.Compare.CompareTarget.VERSION.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, target_);
}
if (!key_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, key_);
}
if (targetUnionCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
4, (long)((java.lang.Long) targetUnion_));
}
if (targetUnionCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
5, (long)((java.lang.Long) targetUnion_));
}
if (targetUnionCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
6, (long)((java.lang.Long) targetUnion_));
}
if (targetUnionCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
7, (com.google.protobuf.ByteString) targetUnion_);
}
if (!rangeEnd_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(8, rangeEnd_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof etcdserverpb.Rpc.Compare)) {
return super.equals(obj);
}
etcdserverpb.Rpc.Compare other = (etcdserverpb.Rpc.Compare) obj;
boolean result = true;
result = result && result_ == other.result_;
result = result && target_ == other.target_;
result = result && getKey()
.equals(other.getKey());
result = result && getRangeEnd()
.equals(other.getRangeEnd());
result = result && getTargetUnionCase().equals(
other.getTargetUnionCase());
if (!result) return false;
switch (targetUnionCase_) {
case 4:
result = result && (getVersion()
== other.getVersion());
break;
case 5:
result = result && (getCreateRevision()
== other.getCreateRevision());
break;
case 6:
result = result && (getModRevision()
== other.getModRevision());
break;
case 7:
result = result && getValue()
.equals(other.getValue());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + RESULT_FIELD_NUMBER;
hash = (53 * hash) + result_;
hash = (37 * hash) + TARGET_FIELD_NUMBER;
hash = (53 * hash) + target_;
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + RANGE_END_FIELD_NUMBER;
hash = (53 * hash) + getRangeEnd().hashCode();
switch (targetUnionCase_) {
case 4:
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getVersion());
break;
case 5:
hash = (37 * hash) + CREATE_REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCreateRevision());
break;
case 6:
hash = (37 * hash) + MOD_REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getModRevision());
break;
case 7:
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static etcdserverpb.Rpc.Compare parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.Compare parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.Compare parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.Compare parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.Compare parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.Compare parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.Compare parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.Compare parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.Compare parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.Compare parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.Compare parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.Compare parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(etcdserverpb.Rpc.Compare prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code etcdserverpb.Compare}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.Compare)
etcdserverpb.Rpc.CompareOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_Compare_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_Compare_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.Compare.class, etcdserverpb.Rpc.Compare.Builder.class);
}
// Construct using etcdserverpb.Rpc.Compare.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
result_ = 0;
target_ = 0;
key_ = com.google.protobuf.ByteString.EMPTY;
rangeEnd_ = com.google.protobuf.ByteString.EMPTY;
targetUnionCase_ = 0;
targetUnion_ = null;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_Compare_descriptor;
}
public etcdserverpb.Rpc.Compare getDefaultInstanceForType() {
return etcdserverpb.Rpc.Compare.getDefaultInstance();
}
public etcdserverpb.Rpc.Compare build() {
etcdserverpb.Rpc.Compare result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public etcdserverpb.Rpc.Compare buildPartial() {
etcdserverpb.Rpc.Compare result = new etcdserverpb.Rpc.Compare(this);
result.result_ = result_;
result.target_ = target_;
result.key_ = key_;
if (targetUnionCase_ == 4) {
result.targetUnion_ = targetUnion_;
}
if (targetUnionCase_ == 5) {
result.targetUnion_ = targetUnion_;
}
if (targetUnionCase_ == 6) {
result.targetUnion_ = targetUnion_;
}
if (targetUnionCase_ == 7) {
result.targetUnion_ = targetUnion_;
}
result.rangeEnd_ = rangeEnd_;
result.targetUnionCase_ = targetUnionCase_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof etcdserverpb.Rpc.Compare) {
return mergeFrom((etcdserverpb.Rpc.Compare)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(etcdserverpb.Rpc.Compare other) {
if (other == etcdserverpb.Rpc.Compare.getDefaultInstance()) return this;
if (other.result_ != 0) {
setResultValue(other.getResultValue());
}
if (other.target_ != 0) {
setTargetValue(other.getTargetValue());
}
if (other.getKey() != com.google.protobuf.ByteString.EMPTY) {
setKey(other.getKey());
}
if (other.getRangeEnd() != com.google.protobuf.ByteString.EMPTY) {
setRangeEnd(other.getRangeEnd());
}
switch (other.getTargetUnionCase()) {
case VERSION: {
setVersion(other.getVersion());
break;
}
case CREATE_REVISION: {
setCreateRevision(other.getCreateRevision());
break;
}
case MOD_REVISION: {
setModRevision(other.getModRevision());
break;
}
case VALUE: {
setValue(other.getValue());
break;
}
case TARGETUNION_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
etcdserverpb.Rpc.Compare parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (etcdserverpb.Rpc.Compare) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int targetUnionCase_ = 0;
private java.lang.Object targetUnion_;
public TargetUnionCase
getTargetUnionCase() {
return TargetUnionCase.forNumber(
targetUnionCase_);
}
public Builder clearTargetUnion() {
targetUnionCase_ = 0;
targetUnion_ = null;
onChanged();
return this;
}
private int result_ = 0;
/**
*
* result is logical comparison operation for this comparison.
*
*
* .etcdserverpb.Compare.CompareResult result = 1;
*/
public int getResultValue() {
return result_;
}
/**
*
* result is logical comparison operation for this comparison.
*
* range_end compares the given target to all keys in the range [key, range_end).
* See RangeRequest for more details on key ranges.
*
*
* bytes range_end = 8;
*/
public Builder setRangeEnd(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
rangeEnd_ = value;
onChanged();
return this;
}
/**
*
* range_end compares the given target to all keys in the range [key, range_end).
* See RangeRequest for more details on key ranges.
*
*
* bytes range_end = 8;
*/
public Builder clearRangeEnd() {
rangeEnd_ = getDefaultInstance().getRangeEnd();
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:etcdserverpb.Compare)
}
// @@protoc_insertion_point(class_scope:etcdserverpb.Compare)
private static final etcdserverpb.Rpc.Compare DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new etcdserverpb.Rpc.Compare();
}
public static etcdserverpb.Rpc.Compare getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Compare parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Compare(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public etcdserverpb.Rpc.Compare getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TxnRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:etcdserverpb.TxnRequest)
com.google.protobuf.MessageOrBuilder {
/**
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* From google paxosdb paper:
* Our implementation hinges around a powerful primitive which we call MultiOp. All other database
* operations except for iteration are implemented as a single call to MultiOp. A MultiOp is applied atomically
* and consists of three components:
* 1. A list of tests called guard. Each test in guard checks a single entry in the database. It may check
* for the absence or presence of a value, or compare with a given value. Two different tests in the guard
* may apply to the same or different entries in the database. All tests in the guard are applied and
* MultiOp returns the results. If all tests are true, MultiOp executes t op (see item 2 below), otherwise
* it executes f op (see item 3 below).
* 2. A list of database operations called t op. Each operation in the list is either an insert, delete, or
* lookup operation, and applies to a single database entry. Two different operations in the list may apply
* to the same or different entries in the database. These operations are executed
* if guard evaluates to
* true.
* 3. A list of database operations called f op. Like t op, but executed if guard evaluates to false.
*
*
* Protobuf type {@code etcdserverpb.TxnRequest}
*/
public static final class TxnRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.TxnRequest)
TxnRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use TxnRequest.newBuilder() to construct.
private TxnRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TxnRequest() {
compare_ = java.util.Collections.emptyList();
success_ = java.util.Collections.emptyList();
failure_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TxnRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
compare_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
compare_.add(
input.readMessage(etcdserverpb.Rpc.Compare.parser(), extensionRegistry));
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
success_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
success_.add(
input.readMessage(etcdserverpb.Rpc.RequestOp.parser(), extensionRegistry));
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
failure_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
failure_.add(
input.readMessage(etcdserverpb.Rpc.RequestOp.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
compare_ = java.util.Collections.unmodifiableList(compare_);
}
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
success_ = java.util.Collections.unmodifiableList(success_);
}
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
failure_ = java.util.Collections.unmodifiableList(failure_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_TxnRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_TxnRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.TxnRequest.class, etcdserverpb.Rpc.TxnRequest.Builder.class);
}
public static final int COMPARE_FIELD_NUMBER = 1;
private java.util.List compare_;
/**
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
*
* repeated .etcdserverpb.Compare compare = 1;
*/
public int getCompareCount() {
return compare_.size();
}
/**
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
*
* repeated .etcdserverpb.Compare compare = 1;
*/
public etcdserverpb.Rpc.CompareOrBuilder getCompareOrBuilder(
int index) {
return compare_.get(index);
}
public static final int SUCCESS_FIELD_NUMBER = 2;
private java.util.List success_;
/**
*
* success is a list of requests which will be applied when compare evaluates to true.
*
* failure is a list of requests which will be applied when compare evaluates to false.
*
*
* repeated .etcdserverpb.RequestOp failure = 3;
*/
public etcdserverpb.Rpc.RequestOpOrBuilder getFailureOrBuilder(
int index) {
return failure_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < compare_.size(); i++) {
output.writeMessage(1, compare_.get(i));
}
for (int i = 0; i < success_.size(); i++) {
output.writeMessage(2, success_.get(i));
}
for (int i = 0; i < failure_.size(); i++) {
output.writeMessage(3, failure_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < compare_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, compare_.get(i));
}
for (int i = 0; i < success_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, success_.get(i));
}
for (int i = 0; i < failure_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, failure_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof etcdserverpb.Rpc.TxnRequest)) {
return super.equals(obj);
}
etcdserverpb.Rpc.TxnRequest other = (etcdserverpb.Rpc.TxnRequest) obj;
boolean result = true;
result = result && getCompareList()
.equals(other.getCompareList());
result = result && getSuccessList()
.equals(other.getSuccessList());
result = result && getFailureList()
.equals(other.getFailureList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getCompareCount() > 0) {
hash = (37 * hash) + COMPARE_FIELD_NUMBER;
hash = (53 * hash) + getCompareList().hashCode();
}
if (getSuccessCount() > 0) {
hash = (37 * hash) + SUCCESS_FIELD_NUMBER;
hash = (53 * hash) + getSuccessList().hashCode();
}
if (getFailureCount() > 0) {
hash = (37 * hash) + FAILURE_FIELD_NUMBER;
hash = (53 * hash) + getFailureList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static etcdserverpb.Rpc.TxnRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.TxnRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.TxnRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.TxnRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.TxnRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.TxnRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.TxnRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.TxnRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.TxnRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.TxnRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.TxnRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.TxnRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(etcdserverpb.Rpc.TxnRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* From google paxosdb paper:
* Our implementation hinges around a powerful primitive which we call MultiOp. All other database
* operations except for iteration are implemented as a single call to MultiOp. A MultiOp is applied atomically
* and consists of three components:
* 1. A list of tests called guard. Each test in guard checks a single entry in the database. It may check
* for the absence or presence of a value, or compare with a given value. Two different tests in the guard
* may apply to the same or different entries in the database. All tests in the guard are applied and
* MultiOp returns the results. If all tests are true, MultiOp executes t op (see item 2 below), otherwise
* it executes f op (see item 3 below).
* 2. A list of database operations called t op. Each operation in the list is either an insert, delete, or
* lookup operation, and applies to a single database entry. Two different operations in the list may apply
* to the same or different entries in the database. These operations are executed
* if guard evaluates to
* true.
* 3. A list of database operations called f op. Like t op, but executed if guard evaluates to false.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
*
* repeated .etcdserverpb.Compare compare = 1;
*/
public int getCompareCount() {
if (compareBuilder_ == null) {
return compare_.size();
} else {
return compareBuilder_.getCount();
}
}
/**
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
*
* repeated .etcdserverpb.Compare compare = 1;
*/
public Builder setCompare(
int index, etcdserverpb.Rpc.Compare value) {
if (compareBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCompareIsMutable();
compare_.set(index, value);
onChanged();
} else {
compareBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
*
* repeated .etcdserverpb.Compare compare = 1;
*/
public Builder addCompare(etcdserverpb.Rpc.Compare value) {
if (compareBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCompareIsMutable();
compare_.add(value);
onChanged();
} else {
compareBuilder_.addMessage(value);
}
return this;
}
/**
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
*
* repeated .etcdserverpb.Compare compare = 1;
*/
public Builder addCompare(
int index, etcdserverpb.Rpc.Compare value) {
if (compareBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCompareIsMutable();
compare_.add(index, value);
onChanged();
} else {
compareBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
*
* repeated .etcdserverpb.Compare compare = 1;
*/
public etcdserverpb.Rpc.Compare.Builder getCompareBuilder(
int index) {
return getCompareFieldBuilder().getBuilder(index);
}
/**
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
*
* repeated .etcdserverpb.Compare compare = 1;
*/
public etcdserverpb.Rpc.CompareOrBuilder getCompareOrBuilder(
int index) {
if (compareBuilder_ == null) {
return compare_.get(index); } else {
return compareBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* compare is a list of predicates representing a conjunction of terms.
* If the comparisons succeed, then the success requests will be processed in order,
* and the response will contain their respective responses in order.
* If the comparisons fail, then the failure requests will be processed in order,
* and the response will contain their respective responses in order.
*
* physical is set so the RPC will wait until the compaction is physically
* applied to the local database such that compacted entries are totally
* removed from the backend database.
*
* CompactionRequest compacts the key-value store up to a given revision. All superseded keys
* with a revision less than the compaction revision will be removed.
*
*
* Protobuf type {@code etcdserverpb.CompactionRequest}
*/
public static final class CompactionRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.CompactionRequest)
CompactionRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use CompactionRequest.newBuilder() to construct.
private CompactionRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CompactionRequest() {
revision_ = 0L;
physical_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CompactionRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
revision_ = input.readInt64();
break;
}
case 16: {
physical_ = input.readBool();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_CompactionRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_CompactionRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.CompactionRequest.class, etcdserverpb.Rpc.CompactionRequest.Builder.class);
}
public static final int REVISION_FIELD_NUMBER = 1;
private long revision_;
/**
*
* revision is the key-value store revision for the compaction operation.
*
*
* int64 revision = 1;
*/
public long getRevision() {
return revision_;
}
public static final int PHYSICAL_FIELD_NUMBER = 2;
private boolean physical_;
/**
*
* physical is set so the RPC will wait until the compaction is physically
* applied to the local database such that compacted entries are totally
* removed from the backend database.
*
*
* bool physical = 2;
*/
public boolean getPhysical() {
return physical_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (revision_ != 0L) {
output.writeInt64(1, revision_);
}
if (physical_ != false) {
output.writeBool(2, physical_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (revision_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, revision_);
}
if (physical_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, physical_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof etcdserverpb.Rpc.CompactionRequest)) {
return super.equals(obj);
}
etcdserverpb.Rpc.CompactionRequest other = (etcdserverpb.Rpc.CompactionRequest) obj;
boolean result = true;
result = result && (getRevision()
== other.getRevision());
result = result && (getPhysical()
== other.getPhysical());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRevision());
hash = (37 * hash) + PHYSICAL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getPhysical());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static etcdserverpb.Rpc.CompactionRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.CompactionRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.CompactionRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.CompactionRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.CompactionRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.CompactionRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.CompactionRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.CompactionRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.CompactionRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.CompactionRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.CompactionRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.CompactionRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(etcdserverpb.Rpc.CompactionRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* CompactionRequest compacts the key-value store up to a given revision. All superseded keys
* with a revision less than the compaction revision will be removed.
*
*
* Protobuf type {@code etcdserverpb.CompactionRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.CompactionRequest)
etcdserverpb.Rpc.CompactionRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_CompactionRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_CompactionRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.CompactionRequest.class, etcdserverpb.Rpc.CompactionRequest.Builder.class);
}
// Construct using etcdserverpb.Rpc.CompactionRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
revision_ = 0L;
physical_ = false;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_CompactionRequest_descriptor;
}
public etcdserverpb.Rpc.CompactionRequest getDefaultInstanceForType() {
return etcdserverpb.Rpc.CompactionRequest.getDefaultInstance();
}
public etcdserverpb.Rpc.CompactionRequest build() {
etcdserverpb.Rpc.CompactionRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public etcdserverpb.Rpc.CompactionRequest buildPartial() {
etcdserverpb.Rpc.CompactionRequest result = new etcdserverpb.Rpc.CompactionRequest(this);
result.revision_ = revision_;
result.physical_ = physical_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof etcdserverpb.Rpc.CompactionRequest) {
return mergeFrom((etcdserverpb.Rpc.CompactionRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(etcdserverpb.Rpc.CompactionRequest other) {
if (other == etcdserverpb.Rpc.CompactionRequest.getDefaultInstance()) return this;
if (other.getRevision() != 0L) {
setRevision(other.getRevision());
}
if (other.getPhysical() != false) {
setPhysical(other.getPhysical());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
etcdserverpb.Rpc.CompactionRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (etcdserverpb.Rpc.CompactionRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long revision_ ;
/**
*
* revision is the key-value store revision for the compaction operation.
*
*
* int64 revision = 1;
*/
public long getRevision() {
return revision_;
}
/**
*
* revision is the key-value store revision for the compaction operation.
*
* physical is set so the RPC will wait until the compaction is physically
* applied to the local database such that compacted entries are totally
* removed from the backend database.
*
* physical is set so the RPC will wait until the compaction is physically
* applied to the local database such that compacted entries are totally
* removed from the backend database.
*
* physical is set so the RPC will wait until the compaction is physically
* applied to the local database such that compacted entries are totally
* removed from the backend database.
*
*
* bool physical = 2;
*/
public Builder clearPhysical() {
physical_ = false;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:etcdserverpb.CompactionRequest)
}
// @@protoc_insertion_point(class_scope:etcdserverpb.CompactionRequest)
private static final etcdserverpb.Rpc.CompactionRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new etcdserverpb.Rpc.CompactionRequest();
}
public static etcdserverpb.Rpc.CompactionRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public CompactionRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CompactionRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public etcdserverpb.Rpc.CompactionRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CompactionResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:etcdserverpb.CompactionResponse)
com.google.protobuf.MessageOrBuilder {
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
boolean hasHeader();
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
etcdserverpb.Rpc.ResponseHeader getHeader();
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
etcdserverpb.Rpc.ResponseHeaderOrBuilder getHeaderOrBuilder();
}
/**
* Protobuf type {@code etcdserverpb.CompactionResponse}
*/
public static final class CompactionResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.CompactionResponse)
CompactionResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use CompactionResponse.newBuilder() to construct.
private CompactionResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CompactionResponse() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CompactionResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
etcdserverpb.Rpc.ResponseHeader.Builder subBuilder = null;
if (header_ != null) {
subBuilder = header_.toBuilder();
}
header_ = input.readMessage(etcdserverpb.Rpc.ResponseHeader.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(header_);
header_ = subBuilder.buildPartial();
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_CompactionResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_CompactionResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.CompactionResponse.class, etcdserverpb.Rpc.CompactionResponse.Builder.class);
}
public static final int HEADER_FIELD_NUMBER = 1;
private etcdserverpb.Rpc.ResponseHeader header_;
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public boolean hasHeader() {
return header_ != null;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public etcdserverpb.Rpc.ResponseHeader getHeader() {
return header_ == null ? etcdserverpb.Rpc.ResponseHeader.getDefaultInstance() : header_;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public etcdserverpb.Rpc.ResponseHeaderOrBuilder getHeaderOrBuilder() {
return getHeader();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (header_ != null) {
output.writeMessage(1, getHeader());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (header_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getHeader());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof etcdserverpb.Rpc.CompactionResponse)) {
return super.equals(obj);
}
etcdserverpb.Rpc.CompactionResponse other = (etcdserverpb.Rpc.CompactionResponse) obj;
boolean result = true;
result = result && (hasHeader() == other.hasHeader());
if (hasHeader()) {
result = result && getHeader()
.equals(other.getHeader());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasHeader()) {
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static etcdserverpb.Rpc.CompactionResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.CompactionResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.CompactionResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.CompactionResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.CompactionResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.CompactionResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.CompactionResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.CompactionResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.CompactionResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.CompactionResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.CompactionResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.CompactionResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(etcdserverpb.Rpc.CompactionResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code etcdserverpb.CompactionResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.CompactionResponse)
etcdserverpb.Rpc.CompactionResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_CompactionResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_CompactionResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.CompactionResponse.class, etcdserverpb.Rpc.CompactionResponse.Builder.class);
}
// Construct using etcdserverpb.Rpc.CompactionResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
if (headerBuilder_ == null) {
header_ = null;
} else {
header_ = null;
headerBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_CompactionResponse_descriptor;
}
public etcdserverpb.Rpc.CompactionResponse getDefaultInstanceForType() {
return etcdserverpb.Rpc.CompactionResponse.getDefaultInstance();
}
public etcdserverpb.Rpc.CompactionResponse build() {
etcdserverpb.Rpc.CompactionResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public etcdserverpb.Rpc.CompactionResponse buildPartial() {
etcdserverpb.Rpc.CompactionResponse result = new etcdserverpb.Rpc.CompactionResponse(this);
if (headerBuilder_ == null) {
result.header_ = header_;
} else {
result.header_ = headerBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof etcdserverpb.Rpc.CompactionResponse) {
return mergeFrom((etcdserverpb.Rpc.CompactionResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(etcdserverpb.Rpc.CompactionResponse other) {
if (other == etcdserverpb.Rpc.CompactionResponse.getDefaultInstance()) return this;
if (other.hasHeader()) {
mergeHeader(other.getHeader());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
etcdserverpb.Rpc.CompactionResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (etcdserverpb.Rpc.CompactionResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private etcdserverpb.Rpc.ResponseHeader header_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
etcdserverpb.Rpc.ResponseHeader, etcdserverpb.Rpc.ResponseHeader.Builder, etcdserverpb.Rpc.ResponseHeaderOrBuilder> headerBuilder_;
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public boolean hasHeader() {
return headerBuilder_ != null || header_ != null;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public etcdserverpb.Rpc.ResponseHeader getHeader() {
if (headerBuilder_ == null) {
return header_ == null ? etcdserverpb.Rpc.ResponseHeader.getDefaultInstance() : header_;
} else {
return headerBuilder_.getMessage();
}
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public Builder setHeader(etcdserverpb.Rpc.ResponseHeader value) {
if (headerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
header_ = value;
onChanged();
} else {
headerBuilder_.setMessage(value);
}
return this;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public Builder setHeader(
etcdserverpb.Rpc.ResponseHeader.Builder builderForValue) {
if (headerBuilder_ == null) {
header_ = builderForValue.build();
onChanged();
} else {
headerBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public Builder mergeHeader(etcdserverpb.Rpc.ResponseHeader value) {
if (headerBuilder_ == null) {
if (header_ != null) {
header_ =
etcdserverpb.Rpc.ResponseHeader.newBuilder(header_).mergeFrom(value).buildPartial();
} else {
header_ = value;
}
onChanged();
} else {
headerBuilder_.mergeFrom(value);
}
return this;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public Builder clearHeader() {
if (headerBuilder_ == null) {
header_ = null;
onChanged();
} else {
header_ = null;
headerBuilder_ = null;
}
return this;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public etcdserverpb.Rpc.ResponseHeader.Builder getHeaderBuilder() {
onChanged();
return getHeaderFieldBuilder().getBuilder();
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public etcdserverpb.Rpc.ResponseHeaderOrBuilder getHeaderOrBuilder() {
if (headerBuilder_ != null) {
return headerBuilder_.getMessageOrBuilder();
} else {
return header_ == null ?
etcdserverpb.Rpc.ResponseHeader.getDefaultInstance() : header_;
}
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
etcdserverpb.Rpc.ResponseHeader, etcdserverpb.Rpc.ResponseHeader.Builder, etcdserverpb.Rpc.ResponseHeaderOrBuilder>
getHeaderFieldBuilder() {
if (headerBuilder_ == null) {
headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
etcdserverpb.Rpc.ResponseHeader, etcdserverpb.Rpc.ResponseHeader.Builder, etcdserverpb.Rpc.ResponseHeaderOrBuilder>(
getHeader(),
getParentForChildren(),
isClean());
header_ = null;
}
return headerBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:etcdserverpb.CompactionResponse)
}
// @@protoc_insertion_point(class_scope:etcdserverpb.CompactionResponse)
private static final etcdserverpb.Rpc.CompactionResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new etcdserverpb.Rpc.CompactionResponse();
}
public static etcdserverpb.Rpc.CompactionResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public CompactionResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CompactionResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public etcdserverpb.Rpc.CompactionResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HashRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:etcdserverpb.HashRequest)
com.google.protobuf.MessageOrBuilder {
}
/**
* Protobuf type {@code etcdserverpb.HashRequest}
*/
public static final class HashRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.HashRequest)
HashRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use HashRequest.newBuilder() to construct.
private HashRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HashRequest() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HashRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_HashRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_HashRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.HashRequest.class, etcdserverpb.Rpc.HashRequest.Builder.class);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof etcdserverpb.Rpc.HashRequest)) {
return super.equals(obj);
}
etcdserverpb.Rpc.HashRequest other = (etcdserverpb.Rpc.HashRequest) obj;
boolean result = true;
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static etcdserverpb.Rpc.HashRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.HashRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.HashRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.HashRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.HashRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.HashRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.HashRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.HashRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.HashRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.HashRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.HashRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.HashRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(etcdserverpb.Rpc.HashRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code etcdserverpb.HashRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.HashRequest)
etcdserverpb.Rpc.HashRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_HashRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_HashRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.HashRequest.class, etcdserverpb.Rpc.HashRequest.Builder.class);
}
// Construct using etcdserverpb.Rpc.HashRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_HashRequest_descriptor;
}
public etcdserverpb.Rpc.HashRequest getDefaultInstanceForType() {
return etcdserverpb.Rpc.HashRequest.getDefaultInstance();
}
public etcdserverpb.Rpc.HashRequest build() {
etcdserverpb.Rpc.HashRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public etcdserverpb.Rpc.HashRequest buildPartial() {
etcdserverpb.Rpc.HashRequest result = new etcdserverpb.Rpc.HashRequest(this);
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof etcdserverpb.Rpc.HashRequest) {
return mergeFrom((etcdserverpb.Rpc.HashRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(etcdserverpb.Rpc.HashRequest other) {
if (other == etcdserverpb.Rpc.HashRequest.getDefaultInstance()) return this;
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
etcdserverpb.Rpc.HashRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (etcdserverpb.Rpc.HashRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:etcdserverpb.HashRequest)
}
// @@protoc_insertion_point(class_scope:etcdserverpb.HashRequest)
private static final etcdserverpb.Rpc.HashRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new etcdserverpb.Rpc.HashRequest();
}
public static etcdserverpb.Rpc.HashRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public HashRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HashRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public etcdserverpb.Rpc.HashRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HashResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:etcdserverpb.HashResponse)
com.google.protobuf.MessageOrBuilder {
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
boolean hasHeader();
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
etcdserverpb.Rpc.ResponseHeader getHeader();
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
etcdserverpb.Rpc.ResponseHeaderOrBuilder getHeaderOrBuilder();
/**
*
* hash is the hash value computed from the responding member's key-value store.
*
*
* uint32 hash = 2;
*/
int getHash();
}
/**
* Protobuf type {@code etcdserverpb.HashResponse}
*/
public static final class HashResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.HashResponse)
HashResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use HashResponse.newBuilder() to construct.
private HashResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HashResponse() {
hash_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HashResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
etcdserverpb.Rpc.ResponseHeader.Builder subBuilder = null;
if (header_ != null) {
subBuilder = header_.toBuilder();
}
header_ = input.readMessage(etcdserverpb.Rpc.ResponseHeader.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(header_);
header_ = subBuilder.buildPartial();
}
break;
}
case 16: {
hash_ = input.readUInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_HashResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_HashResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.HashResponse.class, etcdserverpb.Rpc.HashResponse.Builder.class);
}
public static final int HEADER_FIELD_NUMBER = 1;
private etcdserverpb.Rpc.ResponseHeader header_;
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public boolean hasHeader() {
return header_ != null;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public etcdserverpb.Rpc.ResponseHeader getHeader() {
return header_ == null ? etcdserverpb.Rpc.ResponseHeader.getDefaultInstance() : header_;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public etcdserverpb.Rpc.ResponseHeaderOrBuilder getHeaderOrBuilder() {
return getHeader();
}
public static final int HASH_FIELD_NUMBER = 2;
private int hash_;
/**
*
* hash is the hash value computed from the responding member's key-value store.
*
*
* uint32 hash = 2;
*/
public int getHash() {
return hash_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (header_ != null) {
output.writeMessage(1, getHeader());
}
if (hash_ != 0) {
output.writeUInt32(2, hash_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (header_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getHeader());
}
if (hash_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, hash_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof etcdserverpb.Rpc.HashResponse)) {
return super.equals(obj);
}
etcdserverpb.Rpc.HashResponse other = (etcdserverpb.Rpc.HashResponse) obj;
boolean result = true;
result = result && (hasHeader() == other.hasHeader());
if (hasHeader()) {
result = result && getHeader()
.equals(other.getHeader());
}
result = result && (getHash()
== other.getHash());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasHeader()) {
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
}
hash = (37 * hash) + HASH_FIELD_NUMBER;
hash = (53 * hash) + getHash();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static etcdserverpb.Rpc.HashResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.HashResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.HashResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.HashResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.HashResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.HashResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.HashResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.HashResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.HashResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.HashResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.HashResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.HashResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(etcdserverpb.Rpc.HashResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code etcdserverpb.HashResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.HashResponse)
etcdserverpb.Rpc.HashResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_HashResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_HashResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.HashResponse.class, etcdserverpb.Rpc.HashResponse.Builder.class);
}
// Construct using etcdserverpb.Rpc.HashResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
if (headerBuilder_ == null) {
header_ = null;
} else {
header_ = null;
headerBuilder_ = null;
}
hash_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_HashResponse_descriptor;
}
public etcdserverpb.Rpc.HashResponse getDefaultInstanceForType() {
return etcdserverpb.Rpc.HashResponse.getDefaultInstance();
}
public etcdserverpb.Rpc.HashResponse build() {
etcdserverpb.Rpc.HashResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public etcdserverpb.Rpc.HashResponse buildPartial() {
etcdserverpb.Rpc.HashResponse result = new etcdserverpb.Rpc.HashResponse(this);
if (headerBuilder_ == null) {
result.header_ = header_;
} else {
result.header_ = headerBuilder_.build();
}
result.hash_ = hash_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof etcdserverpb.Rpc.HashResponse) {
return mergeFrom((etcdserverpb.Rpc.HashResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(etcdserverpb.Rpc.HashResponse other) {
if (other == etcdserverpb.Rpc.HashResponse.getDefaultInstance()) return this;
if (other.hasHeader()) {
mergeHeader(other.getHeader());
}
if (other.getHash() != 0) {
setHash(other.getHash());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
etcdserverpb.Rpc.HashResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (etcdserverpb.Rpc.HashResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private etcdserverpb.Rpc.ResponseHeader header_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
etcdserverpb.Rpc.ResponseHeader, etcdserverpb.Rpc.ResponseHeader.Builder, etcdserverpb.Rpc.ResponseHeaderOrBuilder> headerBuilder_;
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public boolean hasHeader() {
return headerBuilder_ != null || header_ != null;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public etcdserverpb.Rpc.ResponseHeader getHeader() {
if (headerBuilder_ == null) {
return header_ == null ? etcdserverpb.Rpc.ResponseHeader.getDefaultInstance() : header_;
} else {
return headerBuilder_.getMessage();
}
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public Builder setHeader(etcdserverpb.Rpc.ResponseHeader value) {
if (headerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
header_ = value;
onChanged();
} else {
headerBuilder_.setMessage(value);
}
return this;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public Builder setHeader(
etcdserverpb.Rpc.ResponseHeader.Builder builderForValue) {
if (headerBuilder_ == null) {
header_ = builderForValue.build();
onChanged();
} else {
headerBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public Builder mergeHeader(etcdserverpb.Rpc.ResponseHeader value) {
if (headerBuilder_ == null) {
if (header_ != null) {
header_ =
etcdserverpb.Rpc.ResponseHeader.newBuilder(header_).mergeFrom(value).buildPartial();
} else {
header_ = value;
}
onChanged();
} else {
headerBuilder_.mergeFrom(value);
}
return this;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public Builder clearHeader() {
if (headerBuilder_ == null) {
header_ = null;
onChanged();
} else {
header_ = null;
headerBuilder_ = null;
}
return this;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public etcdserverpb.Rpc.ResponseHeader.Builder getHeaderBuilder() {
onChanged();
return getHeaderFieldBuilder().getBuilder();
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public etcdserverpb.Rpc.ResponseHeaderOrBuilder getHeaderOrBuilder() {
if (headerBuilder_ != null) {
return headerBuilder_.getMessageOrBuilder();
} else {
return header_ == null ?
etcdserverpb.Rpc.ResponseHeader.getDefaultInstance() : header_;
}
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
etcdserverpb.Rpc.ResponseHeader, etcdserverpb.Rpc.ResponseHeader.Builder, etcdserverpb.Rpc.ResponseHeaderOrBuilder>
getHeaderFieldBuilder() {
if (headerBuilder_ == null) {
headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
etcdserverpb.Rpc.ResponseHeader, etcdserverpb.Rpc.ResponseHeader.Builder, etcdserverpb.Rpc.ResponseHeaderOrBuilder>(
getHeader(),
getParentForChildren(),
isClean());
header_ = null;
}
return headerBuilder_;
}
private int hash_ ;
/**
*
* hash is the hash value computed from the responding member's key-value store.
*
*
* uint32 hash = 2;
*/
public int getHash() {
return hash_;
}
/**
*
* hash is the hash value computed from the responding member's key-value store.
*
* range_end is the end of the range [key, range_end) to watch. If range_end is not given,
* only the key argument is watched. If range_end is equal to '\0', all keys greater than
* or equal to the key argument are watched.
* If the range_end is one bit larger than the given key,
* then all keys with the prefix (the given key) will be watched.
*
* progress_notify is set so that the etcd server will periodically send a WatchResponse with
* no events to the new watcher if there are no recent events. It is useful when clients
* wish to recover a disconnected watcher starting from a recent known revision.
* The etcd server may decide how often it will send notifications based on current load.
*
* If prev_kv is set, created watcher gets the previous KV before the event happens.
* If the previous KV is already compacted, nothing will be returned.
*
*
* bool prev_kv = 6;
*/
boolean getPrevKv();
}
/**
* Protobuf type {@code etcdserverpb.WatchCreateRequest}
*/
public static final class WatchCreateRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.WatchCreateRequest)
WatchCreateRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use WatchCreateRequest.newBuilder() to construct.
private WatchCreateRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private WatchCreateRequest() {
key_ = com.google.protobuf.ByteString.EMPTY;
rangeEnd_ = com.google.protobuf.ByteString.EMPTY;
startRevision_ = 0L;
progressNotify_ = false;
filters_ = java.util.Collections.emptyList();
prevKv_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private WatchCreateRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
key_ = input.readBytes();
break;
}
case 18: {
rangeEnd_ = input.readBytes();
break;
}
case 24: {
startRevision_ = input.readInt64();
break;
}
case 32: {
progressNotify_ = input.readBool();
break;
}
case 40: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
filters_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
filters_.add(rawValue);
break;
}
case 42: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
filters_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
filters_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 48: {
prevKv_ = input.readBool();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
filters_ = java.util.Collections.unmodifiableList(filters_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_WatchCreateRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_WatchCreateRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.WatchCreateRequest.class, etcdserverpb.Rpc.WatchCreateRequest.Builder.class);
}
/**
* Protobuf enum {@code etcdserverpb.WatchCreateRequest.FilterType}
*/
public enum FilterType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
* NOPUT = 0;
*/
public static final int NOPUT_VALUE = 0;
/**
*
* filter out delete event.
*
*
* NODELETE = 1;
*/
public static final int NODELETE_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static FilterType valueOf(int value) {
return forNumber(value);
}
public static FilterType forNumber(int value) {
switch (value) {
case 0: return NOPUT;
case 1: return NODELETE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
FilterType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public FilterType findValueByNumber(int number) {
return FilterType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return etcdserverpb.Rpc.WatchCreateRequest.getDescriptor().getEnumTypes().get(0);
}
private static final FilterType[] VALUES = values();
public static FilterType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private FilterType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:etcdserverpb.WatchCreateRequest.FilterType)
}
private int bitField0_;
public static final int KEY_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString key_;
/**
*
* key is the key to register for watching.
*
*
* bytes key = 1;
*/
public com.google.protobuf.ByteString getKey() {
return key_;
}
public static final int RANGE_END_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString rangeEnd_;
/**
*
* range_end is the end of the range [key, range_end) to watch. If range_end is not given,
* only the key argument is watched. If range_end is equal to '\0', all keys greater than
* or equal to the key argument are watched.
* If the range_end is one bit larger than the given key,
* then all keys with the prefix (the given key) will be watched.
*
*
* bytes range_end = 2;
*/
public com.google.protobuf.ByteString getRangeEnd() {
return rangeEnd_;
}
public static final int START_REVISION_FIELD_NUMBER = 3;
private long startRevision_;
/**
*
* start_revision is an optional revision to watch from (inclusive). No start_revision is "now".
*
*
* int64 start_revision = 3;
*/
public long getStartRevision() {
return startRevision_;
}
public static final int PROGRESS_NOTIFY_FIELD_NUMBER = 4;
private boolean progressNotify_;
/**
*
* progress_notify is set so that the etcd server will periodically send a WatchResponse with
* no events to the new watcher if there are no recent events. It is useful when clients
* wish to recover a disconnected watcher starting from a recent known revision.
* The etcd server may decide how often it will send notifications based on current load.
*
*
* bool progress_notify = 4;
*/
public boolean getProgressNotify() {
return progressNotify_;
}
public static final int FILTERS_FIELD_NUMBER = 5;
private java.util.List filters_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, etcdserverpb.Rpc.WatchCreateRequest.FilterType> filters_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, etcdserverpb.Rpc.WatchCreateRequest.FilterType>() {
public etcdserverpb.Rpc.WatchCreateRequest.FilterType convert(java.lang.Integer from) {
etcdserverpb.Rpc.WatchCreateRequest.FilterType result = etcdserverpb.Rpc.WatchCreateRequest.FilterType.valueOf(from);
return result == null ? etcdserverpb.Rpc.WatchCreateRequest.FilterType.UNRECOGNIZED : result;
}
};
/**
*
* filters filter the events at server side before it sends back to the watcher.
*
* filters filter the events at server side before it sends back to the watcher.
*
*
* repeated .etcdserverpb.WatchCreateRequest.FilterType filters = 5;
*/
public int getFiltersValue(int index) {
return filters_.get(index);
}
private int filtersMemoizedSerializedSize;
public static final int PREV_KV_FIELD_NUMBER = 6;
private boolean prevKv_;
/**
*
* If prev_kv is set, created watcher gets the previous KV before the event happens.
* If the previous KV is already compacted, nothing will be returned.
*
*
* bool prev_kv = 6;
*/
public boolean getPrevKv() {
return prevKv_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!key_.isEmpty()) {
output.writeBytes(1, key_);
}
if (!rangeEnd_.isEmpty()) {
output.writeBytes(2, rangeEnd_);
}
if (startRevision_ != 0L) {
output.writeInt64(3, startRevision_);
}
if (progressNotify_ != false) {
output.writeBool(4, progressNotify_);
}
if (getFiltersList().size() > 0) {
output.writeUInt32NoTag(42);
output.writeUInt32NoTag(filtersMemoizedSerializedSize);
}
for (int i = 0; i < filters_.size(); i++) {
output.writeEnumNoTag(filters_.get(i));
}
if (prevKv_ != false) {
output.writeBool(6, prevKv_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!key_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, key_);
}
if (!rangeEnd_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, rangeEnd_);
}
if (startRevision_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, startRevision_);
}
if (progressNotify_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, progressNotify_);
}
{
int dataSize = 0;
for (int i = 0; i < filters_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(filters_.get(i));
}
size += dataSize;
if (!getFiltersList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}filtersMemoizedSerializedSize = dataSize;
}
if (prevKv_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, prevKv_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof etcdserverpb.Rpc.WatchCreateRequest)) {
return super.equals(obj);
}
etcdserverpb.Rpc.WatchCreateRequest other = (etcdserverpb.Rpc.WatchCreateRequest) obj;
boolean result = true;
result = result && getKey()
.equals(other.getKey());
result = result && getRangeEnd()
.equals(other.getRangeEnd());
result = result && (getStartRevision()
== other.getStartRevision());
result = result && (getProgressNotify()
== other.getProgressNotify());
result = result && filters_.equals(other.filters_);
result = result && (getPrevKv()
== other.getPrevKv());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + RANGE_END_FIELD_NUMBER;
hash = (53 * hash) + getRangeEnd().hashCode();
hash = (37 * hash) + START_REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartRevision());
hash = (37 * hash) + PROGRESS_NOTIFY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getProgressNotify());
if (getFiltersCount() > 0) {
hash = (37 * hash) + FILTERS_FIELD_NUMBER;
hash = (53 * hash) + filters_.hashCode();
}
hash = (37 * hash) + PREV_KV_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getPrevKv());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static etcdserverpb.Rpc.WatchCreateRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.WatchCreateRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.WatchCreateRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.WatchCreateRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.WatchCreateRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.WatchCreateRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.WatchCreateRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.WatchCreateRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.WatchCreateRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.WatchCreateRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.WatchCreateRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.WatchCreateRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(etcdserverpb.Rpc.WatchCreateRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code etcdserverpb.WatchCreateRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.WatchCreateRequest)
etcdserverpb.Rpc.WatchCreateRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_WatchCreateRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_WatchCreateRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.WatchCreateRequest.class, etcdserverpb.Rpc.WatchCreateRequest.Builder.class);
}
// Construct using etcdserverpb.Rpc.WatchCreateRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
key_ = com.google.protobuf.ByteString.EMPTY;
rangeEnd_ = com.google.protobuf.ByteString.EMPTY;
startRevision_ = 0L;
progressNotify_ = false;
filters_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
prevKv_ = false;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_WatchCreateRequest_descriptor;
}
public etcdserverpb.Rpc.WatchCreateRequest getDefaultInstanceForType() {
return etcdserverpb.Rpc.WatchCreateRequest.getDefaultInstance();
}
public etcdserverpb.Rpc.WatchCreateRequest build() {
etcdserverpb.Rpc.WatchCreateRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public etcdserverpb.Rpc.WatchCreateRequest buildPartial() {
etcdserverpb.Rpc.WatchCreateRequest result = new etcdserverpb.Rpc.WatchCreateRequest(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.key_ = key_;
result.rangeEnd_ = rangeEnd_;
result.startRevision_ = startRevision_;
result.progressNotify_ = progressNotify_;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
filters_ = java.util.Collections.unmodifiableList(filters_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.filters_ = filters_;
result.prevKv_ = prevKv_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof etcdserverpb.Rpc.WatchCreateRequest) {
return mergeFrom((etcdserverpb.Rpc.WatchCreateRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(etcdserverpb.Rpc.WatchCreateRequest other) {
if (other == etcdserverpb.Rpc.WatchCreateRequest.getDefaultInstance()) return this;
if (other.getKey() != com.google.protobuf.ByteString.EMPTY) {
setKey(other.getKey());
}
if (other.getRangeEnd() != com.google.protobuf.ByteString.EMPTY) {
setRangeEnd(other.getRangeEnd());
}
if (other.getStartRevision() != 0L) {
setStartRevision(other.getStartRevision());
}
if (other.getProgressNotify() != false) {
setProgressNotify(other.getProgressNotify());
}
if (!other.filters_.isEmpty()) {
if (filters_.isEmpty()) {
filters_ = other.filters_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureFiltersIsMutable();
filters_.addAll(other.filters_);
}
onChanged();
}
if (other.getPrevKv() != false) {
setPrevKv(other.getPrevKv());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
etcdserverpb.Rpc.WatchCreateRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (etcdserverpb.Rpc.WatchCreateRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* range_end is the end of the range [key, range_end) to watch. If range_end is not given,
* only the key argument is watched. If range_end is equal to '\0', all keys greater than
* or equal to the key argument are watched.
* If the range_end is one bit larger than the given key,
* then all keys with the prefix (the given key) will be watched.
*
* range_end is the end of the range [key, range_end) to watch. If range_end is not given,
* only the key argument is watched. If range_end is equal to '\0', all keys greater than
* or equal to the key argument are watched.
* If the range_end is one bit larger than the given key,
* then all keys with the prefix (the given key) will be watched.
*
*
* bytes range_end = 2;
*/
public Builder setRangeEnd(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
rangeEnd_ = value;
onChanged();
return this;
}
/**
*
* range_end is the end of the range [key, range_end) to watch. If range_end is not given,
* only the key argument is watched. If range_end is equal to '\0', all keys greater than
* or equal to the key argument are watched.
* If the range_end is one bit larger than the given key,
* then all keys with the prefix (the given key) will be watched.
*
* progress_notify is set so that the etcd server will periodically send a WatchResponse with
* no events to the new watcher if there are no recent events. It is useful when clients
* wish to recover a disconnected watcher starting from a recent known revision.
* The etcd server may decide how often it will send notifications based on current load.
*
* progress_notify is set so that the etcd server will periodically send a WatchResponse with
* no events to the new watcher if there are no recent events. It is useful when clients
* wish to recover a disconnected watcher starting from a recent known revision.
* The etcd server may decide how often it will send notifications based on current load.
*
* progress_notify is set so that the etcd server will periodically send a WatchResponse with
* no events to the new watcher if there are no recent events. It is useful when clients
* wish to recover a disconnected watcher starting from a recent known revision.
* The etcd server may decide how often it will send notifications based on current load.
*
* If prev_kv is set, created watcher gets the previous KV before the event happens.
* If the previous KV is already compacted, nothing will be returned.
*
* If prev_kv is set, created watcher gets the previous KV before the event happens.
* If the previous KV is already compacted, nothing will be returned.
*
* If prev_kv is set, created watcher gets the previous KV before the event happens.
* If the previous KV is already compacted, nothing will be returned.
*
*
* bool prev_kv = 6;
*/
public Builder clearPrevKv() {
prevKv_ = false;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:etcdserverpb.WatchCreateRequest)
}
// @@protoc_insertion_point(class_scope:etcdserverpb.WatchCreateRequest)
private static final etcdserverpb.Rpc.WatchCreateRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new etcdserverpb.Rpc.WatchCreateRequest();
}
public static etcdserverpb.Rpc.WatchCreateRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public WatchCreateRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new WatchCreateRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public etcdserverpb.Rpc.WatchCreateRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface WatchCancelRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:etcdserverpb.WatchCancelRequest)
com.google.protobuf.MessageOrBuilder {
/**
*
* watch_id is the watcher id to cancel so that no more events are transmitted.
*
*
* int64 watch_id = 1;
*/
long getWatchId();
}
/**
* Protobuf type {@code etcdserverpb.WatchCancelRequest}
*/
public static final class WatchCancelRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.WatchCancelRequest)
WatchCancelRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use WatchCancelRequest.newBuilder() to construct.
private WatchCancelRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private WatchCancelRequest() {
watchId_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private WatchCancelRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
watchId_ = input.readInt64();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_WatchCancelRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_WatchCancelRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.WatchCancelRequest.class, etcdserverpb.Rpc.WatchCancelRequest.Builder.class);
}
public static final int WATCH_ID_FIELD_NUMBER = 1;
private long watchId_;
/**
*
* watch_id is the watcher id to cancel so that no more events are transmitted.
*
*
* int64 watch_id = 1;
*/
public long getWatchId() {
return watchId_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (watchId_ != 0L) {
output.writeInt64(1, watchId_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (watchId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, watchId_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof etcdserverpb.Rpc.WatchCancelRequest)) {
return super.equals(obj);
}
etcdserverpb.Rpc.WatchCancelRequest other = (etcdserverpb.Rpc.WatchCancelRequest) obj;
boolean result = true;
result = result && (getWatchId()
== other.getWatchId());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + WATCH_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getWatchId());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static etcdserverpb.Rpc.WatchCancelRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.WatchCancelRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.WatchCancelRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.WatchCancelRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.WatchCancelRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static etcdserverpb.Rpc.WatchCancelRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static etcdserverpb.Rpc.WatchCancelRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.WatchCancelRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.WatchCancelRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.WatchCancelRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static etcdserverpb.Rpc.WatchCancelRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static etcdserverpb.Rpc.WatchCancelRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(etcdserverpb.Rpc.WatchCancelRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code etcdserverpb.WatchCancelRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.WatchCancelRequest)
etcdserverpb.Rpc.WatchCancelRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_WatchCancelRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_WatchCancelRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.WatchCancelRequest.class, etcdserverpb.Rpc.WatchCancelRequest.Builder.class);
}
// Construct using etcdserverpb.Rpc.WatchCancelRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
watchId_ = 0L;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_WatchCancelRequest_descriptor;
}
public etcdserverpb.Rpc.WatchCancelRequest getDefaultInstanceForType() {
return etcdserverpb.Rpc.WatchCancelRequest.getDefaultInstance();
}
public etcdserverpb.Rpc.WatchCancelRequest build() {
etcdserverpb.Rpc.WatchCancelRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public etcdserverpb.Rpc.WatchCancelRequest buildPartial() {
etcdserverpb.Rpc.WatchCancelRequest result = new etcdserverpb.Rpc.WatchCancelRequest(this);
result.watchId_ = watchId_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof etcdserverpb.Rpc.WatchCancelRequest) {
return mergeFrom((etcdserverpb.Rpc.WatchCancelRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(etcdserverpb.Rpc.WatchCancelRequest other) {
if (other == etcdserverpb.Rpc.WatchCancelRequest.getDefaultInstance()) return this;
if (other.getWatchId() != 0L) {
setWatchId(other.getWatchId());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
etcdserverpb.Rpc.WatchCancelRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (etcdserverpb.Rpc.WatchCancelRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long watchId_ ;
/**
*
* watch_id is the watcher id to cancel so that no more events are transmitted.
*
*
* int64 watch_id = 1;
*/
public long getWatchId() {
return watchId_;
}
/**
*
* watch_id is the watcher id to cancel so that no more events are transmitted.
*
* created is set to true if the response is for a create watch request.
* The client should record the watch_id and expect to receive events for
* the created watcher from the same stream.
* All events sent to the created watcher will attach with the same watch_id.
*
* compact_revision is set to the minimum index if a watcher tries to watch
* at a compacted index.
* This happens when creating a watcher at a compacted revision or the watcher cannot
* catch up with the progress of the key-value store.
* The client should treat the watcher as canceled and should not try to create any
* watcher with the same start_revision again.
*
* cancel_reason indicates the reason for canceling the watcher.
*
*
* string cancel_reason = 6;
*/
com.google.protobuf.ByteString
getCancelReasonBytes();
/**
* repeated .mvccpb.Event events = 11;
*/
java.util.List
getEventsList();
/**
* repeated .mvccpb.Event events = 11;
*/
mvccpb.Kv.Event getEvents(int index);
/**
* repeated .mvccpb.Event events = 11;
*/
int getEventsCount();
/**
* repeated .mvccpb.Event events = 11;
*/
java.util.List extends mvccpb.Kv.EventOrBuilder>
getEventsOrBuilderList();
/**
* repeated .mvccpb.Event events = 11;
*/
mvccpb.Kv.EventOrBuilder getEventsOrBuilder(
int index);
}
/**
* Protobuf type {@code etcdserverpb.WatchResponse}
*/
public static final class WatchResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.WatchResponse)
WatchResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use WatchResponse.newBuilder() to construct.
private WatchResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private WatchResponse() {
watchId_ = 0L;
created_ = false;
canceled_ = false;
compactRevision_ = 0L;
cancelReason_ = "";
events_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private WatchResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
etcdserverpb.Rpc.ResponseHeader.Builder subBuilder = null;
if (header_ != null) {
subBuilder = header_.toBuilder();
}
header_ = input.readMessage(etcdserverpb.Rpc.ResponseHeader.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(header_);
header_ = subBuilder.buildPartial();
}
break;
}
case 16: {
watchId_ = input.readInt64();
break;
}
case 24: {
created_ = input.readBool();
break;
}
case 32: {
canceled_ = input.readBool();
break;
}
case 40: {
compactRevision_ = input.readInt64();
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
cancelReason_ = s;
break;
}
case 90: {
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
events_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000040;
}
events_.add(
input.readMessage(mvccpb.Kv.Event.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
events_ = java.util.Collections.unmodifiableList(events_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_WatchResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_WatchResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.WatchResponse.class, etcdserverpb.Rpc.WatchResponse.Builder.class);
}
private int bitField0_;
public static final int HEADER_FIELD_NUMBER = 1;
private etcdserverpb.Rpc.ResponseHeader header_;
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public boolean hasHeader() {
return header_ != null;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public etcdserverpb.Rpc.ResponseHeader getHeader() {
return header_ == null ? etcdserverpb.Rpc.ResponseHeader.getDefaultInstance() : header_;
}
/**
* .etcdserverpb.ResponseHeader header = 1;
*/
public etcdserverpb.Rpc.ResponseHeaderOrBuilder getHeaderOrBuilder() {
return getHeader();
}
public static final int WATCH_ID_FIELD_NUMBER = 2;
private long watchId_;
/**
*
* watch_id is the ID of the watcher that corresponds to the response.
*
*
* int64 watch_id = 2;
*/
public long getWatchId() {
return watchId_;
}
public static final int CREATED_FIELD_NUMBER = 3;
private boolean created_;
/**
*
* created is set to true if the response is for a create watch request.
* The client should record the watch_id and expect to receive events for
* the created watcher from the same stream.
* All events sent to the created watcher will attach with the same watch_id.
*
*
* bool created = 3;
*/
public boolean getCreated() {
return created_;
}
public static final int CANCELED_FIELD_NUMBER = 4;
private boolean canceled_;
/**
*
* canceled is set to true if the response is for a cancel watch request.
* No further events will be sent to the canceled watcher.
*
*
* bool canceled = 4;
*/
public boolean getCanceled() {
return canceled_;
}
public static final int COMPACT_REVISION_FIELD_NUMBER = 5;
private long compactRevision_;
/**
*
* compact_revision is set to the minimum index if a watcher tries to watch
* at a compacted index.
* This happens when creating a watcher at a compacted revision or the watcher cannot
* catch up with the progress of the key-value store.
* The client should treat the watcher as canceled and should not try to create any
* watcher with the same start_revision again.
*
*
* int64 compact_revision = 5;
*/
public long getCompactRevision() {
return compactRevision_;
}
public static final int CANCEL_REASON_FIELD_NUMBER = 6;
private volatile java.lang.Object cancelReason_;
/**
*
* cancel_reason indicates the reason for canceling the watcher.
*
* created is set to true if the response is for a create watch request.
* The client should record the watch_id and expect to receive events for
* the created watcher from the same stream.
* All events sent to the created watcher will attach with the same watch_id.
*
*
* bool created = 3;
*/
public boolean getCreated() {
return created_;
}
/**
*
* created is set to true if the response is for a create watch request.
* The client should record the watch_id and expect to receive events for
* the created watcher from the same stream.
* All events sent to the created watcher will attach with the same watch_id.
*
* created is set to true if the response is for a create watch request.
* The client should record the watch_id and expect to receive events for
* the created watcher from the same stream.
* All events sent to the created watcher will attach with the same watch_id.
*
* compact_revision is set to the minimum index if a watcher tries to watch
* at a compacted index.
* This happens when creating a watcher at a compacted revision or the watcher cannot
* catch up with the progress of the key-value store.
* The client should treat the watcher as canceled and should not try to create any
* watcher with the same start_revision again.
*
*
* int64 compact_revision = 5;
*/
public long getCompactRevision() {
return compactRevision_;
}
/**
*
* compact_revision is set to the minimum index if a watcher tries to watch
* at a compacted index.
* This happens when creating a watcher at a compacted revision or the watcher cannot
* catch up with the progress of the key-value store.
* The client should treat the watcher as canceled and should not try to create any
* watcher with the same start_revision again.
*
* compact_revision is set to the minimum index if a watcher tries to watch
* at a compacted index.
* This happens when creating a watcher at a compacted revision or the watcher cannot
* catch up with the progress of the key-value store.
* The client should treat the watcher as canceled and should not try to create any
* watcher with the same start_revision again.
*
* clientURLs is the list of URLs the member exposes to clients for communication. If the member is not started, clientURLs will be empty.
*
*
* repeated string clientURLs = 4;
*/
com.google.protobuf.ByteString
getClientURLsBytes(int index);
}
/**
* Protobuf type {@code etcdserverpb.Member}
*/
public static final class Member extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.Member)
MemberOrBuilder {
private static final long serialVersionUID = 0L;
// Use Member.newBuilder() to construct.
private Member(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Member() {
iD_ = 0L;
name_ = "";
peerURLs_ = com.google.protobuf.LazyStringArrayList.EMPTY;
clientURLs_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Member(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
iD_ = input.readUInt64();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
peerURLs_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
peerURLs_.add(s);
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
clientURLs_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
clientURLs_.add(s);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
peerURLs_ = peerURLs_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
clientURLs_ = clientURLs_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_Member_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return etcdserverpb.Rpc.internal_static_etcdserverpb_Member_fieldAccessorTable
.ensureFieldAccessorsInitialized(
etcdserverpb.Rpc.Member.class, etcdserverpb.Rpc.Member.Builder.class);
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
private long iD_;
/**
*
* ID is the member ID for this member.
*
*
* uint64 ID = 1;
*/
public long getID() {
return iD_;
}
public static final int NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object name_;
/**
*
* name is the human-readable name of the member. If the member is not started, the name will be an empty string.
*