org.tikv.kvproto.Metapb Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: metapb.proto
package org.tikv.kvproto;
public final class Metapb {
private Metapb() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
* Protobuf enum {@code metapb.StoreState}
*/
public enum StoreState
implements com.google.protobuf.ProtocolMessageEnum {
/**
* Up = 0;
*/
Up(0),
/**
* Offline = 1;
*/
Offline(1),
/**
* Tombstone = 2;
*/
Tombstone(2),
UNRECOGNIZED(-1),
;
/**
* Up = 0;
*/
public static final int Up_VALUE = 0;
/**
* Offline = 1;
*/
public static final int Offline_VALUE = 1;
/**
* Tombstone = 2;
*/
public static final int Tombstone_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 StoreState valueOf(int value) {
return forNumber(value);
}
public static StoreState forNumber(int value) {
switch (value) {
case 0: return Up;
case 1: return Offline;
case 2: return Tombstone;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
StoreState> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public StoreState findValueByNumber(int number) {
return StoreState.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 org.tikv.kvproto.Metapb.getDescriptor().getEnumTypes().get(0);
}
private static final StoreState[] VALUES = values();
public static StoreState 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 StoreState(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:metapb.StoreState)
}
/**
* Protobuf enum {@code metapb.PeerRole}
*/
public enum PeerRole
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Voter -> Voter
*
*
* Voter = 0;
*/
Voter(0),
/**
*
* Learner/None -> Learner
*
*
* Learner = 1;
*/
Learner(1),
/**
*
* Learner/None -> Voter
*
*
* IncomingVoter = 2;
*/
IncomingVoter(2),
/**
*
* Voter -> Learner
*
*
* DemotingVoter = 3;
*/
DemotingVoter(3),
UNRECOGNIZED(-1),
;
/**
*
* Voter -> Voter
*
*
* Voter = 0;
*/
public static final int Voter_VALUE = 0;
/**
*
* Learner/None -> Learner
*
*
* Learner = 1;
*/
public static final int Learner_VALUE = 1;
/**
*
* Learner/None -> Voter
*
*
* IncomingVoter = 2;
*/
public static final int IncomingVoter_VALUE = 2;
/**
*
* Voter -> Learner
*
*
* DemotingVoter = 3;
*/
public static final int DemotingVoter_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 PeerRole valueOf(int value) {
return forNumber(value);
}
public static PeerRole forNumber(int value) {
switch (value) {
case 0: return Voter;
case 1: return Learner;
case 2: return IncomingVoter;
case 3: return DemotingVoter;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
PeerRole> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public PeerRole findValueByNumber(int number) {
return PeerRole.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 org.tikv.kvproto.Metapb.getDescriptor().getEnumTypes().get(1);
}
private static final PeerRole[] VALUES = values();
public static PeerRole 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 PeerRole(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:metapb.PeerRole)
}
public interface ClusterOrBuilder extends
// @@protoc_insertion_point(interface_extends:metapb.Cluster)
com.google.protobuf.MessageOrBuilder {
/**
* uint64 id = 1;
*/
long getId();
/**
*
* max peer count for a region.
* pd will do the auto-balance if region peer count mismatches.
*
*
* uint32 max_peer_count = 2;
*/
int getMaxPeerCount();
}
/**
* Protobuf type {@code metapb.Cluster}
*/
public static final class Cluster extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:metapb.Cluster)
ClusterOrBuilder {
private static final long serialVersionUID = 0L;
// Use Cluster.newBuilder() to construct.
private Cluster(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Cluster() {
id_ = 0L;
maxPeerCount_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Cluster(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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 16: {
maxPeerCount_ = 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 org.tikv.kvproto.Metapb.internal_static_metapb_Cluster_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Cluster_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Metapb.Cluster.class, org.tikv.kvproto.Metapb.Cluster.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private long id_;
/**
* uint64 id = 1;
*/
public long getId() {
return id_;
}
public static final int MAX_PEER_COUNT_FIELD_NUMBER = 2;
private int maxPeerCount_;
/**
*
* max peer count for a region.
* pd will do the auto-balance if region peer count mismatches.
*
*
* uint32 max_peer_count = 2;
*/
public int getMaxPeerCount() {
return maxPeerCount_;
}
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 (id_ != 0L) {
output.writeUInt64(1, id_);
}
if (maxPeerCount_ != 0) {
output.writeUInt32(2, maxPeerCount_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, id_);
}
if (maxPeerCount_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, maxPeerCount_);
}
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 org.tikv.kvproto.Metapb.Cluster)) {
return super.equals(obj);
}
org.tikv.kvproto.Metapb.Cluster other = (org.tikv.kvproto.Metapb.Cluster) obj;
boolean result = true;
result = result && (getId()
== other.getId());
result = result && (getMaxPeerCount()
== other.getMaxPeerCount());
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) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
hash = (37 * hash) + MAX_PEER_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getMaxPeerCount();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Metapb.Cluster parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.Cluster parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.Cluster parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.Cluster parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.Cluster parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.Cluster parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.Cluster parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.Cluster 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 org.tikv.kvproto.Metapb.Cluster parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.Cluster 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 org.tikv.kvproto.Metapb.Cluster parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.Cluster 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(org.tikv.kvproto.Metapb.Cluster 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 metapb.Cluster}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:metapb.Cluster)
org.tikv.kvproto.Metapb.ClusterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Cluster_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Cluster_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Metapb.Cluster.class, org.tikv.kvproto.Metapb.Cluster.Builder.class);
}
// Construct using org.tikv.kvproto.Metapb.Cluster.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();
id_ = 0L;
maxPeerCount_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Cluster_descriptor;
}
public org.tikv.kvproto.Metapb.Cluster getDefaultInstanceForType() {
return org.tikv.kvproto.Metapb.Cluster.getDefaultInstance();
}
public org.tikv.kvproto.Metapb.Cluster build() {
org.tikv.kvproto.Metapb.Cluster result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.Metapb.Cluster buildPartial() {
org.tikv.kvproto.Metapb.Cluster result = new org.tikv.kvproto.Metapb.Cluster(this);
result.id_ = id_;
result.maxPeerCount_ = maxPeerCount_;
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 org.tikv.kvproto.Metapb.Cluster) {
return mergeFrom((org.tikv.kvproto.Metapb.Cluster)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.Metapb.Cluster other) {
if (other == org.tikv.kvproto.Metapb.Cluster.getDefaultInstance()) return this;
if (other.getId() != 0L) {
setId(other.getId());
}
if (other.getMaxPeerCount() != 0) {
setMaxPeerCount(other.getMaxPeerCount());
}
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 {
org.tikv.kvproto.Metapb.Cluster parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.Metapb.Cluster) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long id_ ;
/**
* uint64 id = 1;
*/
public long getId() {
return id_;
}
/**
* uint64 id = 1;
*/
public Builder setId(long value) {
id_ = value;
onChanged();
return this;
}
/**
* uint64 id = 1;
*/
public Builder clearId() {
id_ = 0L;
onChanged();
return this;
}
private int maxPeerCount_ ;
/**
*
* max peer count for a region.
* pd will do the auto-balance if region peer count mismatches.
*
*
* uint32 max_peer_count = 2;
*/
public int getMaxPeerCount() {
return maxPeerCount_;
}
/**
*
* max peer count for a region.
* pd will do the auto-balance if region peer count mismatches.
*
*
* uint32 max_peer_count = 2;
*/
public Builder setMaxPeerCount(int value) {
maxPeerCount_ = value;
onChanged();
return this;
}
/**
*
* max peer count for a region.
* pd will do the auto-balance if region peer count mismatches.
*
*
* uint32 max_peer_count = 2;
*/
public Builder clearMaxPeerCount() {
maxPeerCount_ = 0;
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:metapb.Cluster)
}
// @@protoc_insertion_point(class_scope:metapb.Cluster)
private static final org.tikv.kvproto.Metapb.Cluster DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Metapb.Cluster();
}
public static org.tikv.kvproto.Metapb.Cluster getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Cluster parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Cluster(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tikv.kvproto.Metapb.Cluster getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StoreLabelOrBuilder extends
// @@protoc_insertion_point(interface_extends:metapb.StoreLabel)
com.google.protobuf.MessageOrBuilder {
/**
* string key = 1;
*/
java.lang.String getKey();
/**
* string key = 1;
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* string value = 2;
*/
java.lang.String getValue();
/**
* string value = 2;
*/
com.google.protobuf.ByteString
getValueBytes();
}
/**
*
* Case insensitive key/value for replica constraints.
*
*
* Protobuf type {@code metapb.StoreLabel}
*/
public static final class StoreLabel extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:metapb.StoreLabel)
StoreLabelOrBuilder {
private static final long serialVersionUID = 0L;
// Use StoreLabel.newBuilder() to construct.
private StoreLabel(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StoreLabel() {
key_ = "";
value_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StoreLabel(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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: {
java.lang.String s = input.readStringRequireUtf8();
key_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
value_ = 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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Metapb.internal_static_metapb_StoreLabel_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Metapb.internal_static_metapb_StoreLabel_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Metapb.StoreLabel.class, org.tikv.kvproto.Metapb.StoreLabel.Builder.class);
}
public static final int KEY_FIELD_NUMBER = 1;
private volatile java.lang.Object key_;
/**
* string key = 1;
*/
public java.lang.String getKey() {
java.lang.Object ref = key_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
key_ = s;
return s;
}
}
/**
* string key = 1;
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_FIELD_NUMBER = 2;
private volatile java.lang.Object value_;
/**
* string value = 2;
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
}
}
/**
* string value = 2;
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (!getKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!getValueBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getKeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
if (!getValueBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_);
}
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 org.tikv.kvproto.Metapb.StoreLabel)) {
return super.equals(obj);
}
org.tikv.kvproto.Metapb.StoreLabel other = (org.tikv.kvproto.Metapb.StoreLabel) obj;
boolean result = true;
result = result && getKey()
.equals(other.getKey());
result = result && getValue()
.equals(other.getValue());
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 = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Metapb.StoreLabel parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.StoreLabel parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.StoreLabel parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.StoreLabel parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.StoreLabel parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.StoreLabel parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.StoreLabel parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.StoreLabel 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 org.tikv.kvproto.Metapb.StoreLabel parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.StoreLabel 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 org.tikv.kvproto.Metapb.StoreLabel parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.StoreLabel 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(org.tikv.kvproto.Metapb.StoreLabel 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;
}
/**
*
* Case insensitive key/value for replica constraints.
*
*
* Protobuf type {@code metapb.StoreLabel}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:metapb.StoreLabel)
org.tikv.kvproto.Metapb.StoreLabelOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Metapb.internal_static_metapb_StoreLabel_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Metapb.internal_static_metapb_StoreLabel_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Metapb.StoreLabel.class, org.tikv.kvproto.Metapb.StoreLabel.Builder.class);
}
// Construct using org.tikv.kvproto.Metapb.StoreLabel.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_ = "";
value_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.Metapb.internal_static_metapb_StoreLabel_descriptor;
}
public org.tikv.kvproto.Metapb.StoreLabel getDefaultInstanceForType() {
return org.tikv.kvproto.Metapb.StoreLabel.getDefaultInstance();
}
public org.tikv.kvproto.Metapb.StoreLabel build() {
org.tikv.kvproto.Metapb.StoreLabel result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.Metapb.StoreLabel buildPartial() {
org.tikv.kvproto.Metapb.StoreLabel result = new org.tikv.kvproto.Metapb.StoreLabel(this);
result.key_ = key_;
result.value_ = value_;
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 org.tikv.kvproto.Metapb.StoreLabel) {
return mergeFrom((org.tikv.kvproto.Metapb.StoreLabel)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.Metapb.StoreLabel other) {
if (other == org.tikv.kvproto.Metapb.StoreLabel.getDefaultInstance()) return this;
if (!other.getKey().isEmpty()) {
key_ = other.key_;
onChanged();
}
if (!other.getValue().isEmpty()) {
value_ = other.value_;
onChanged();
}
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 {
org.tikv.kvproto.Metapb.StoreLabel parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.Metapb.StoreLabel) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object key_ = "";
/**
* string key = 1;
*/
public java.lang.String getKey() {
java.lang.Object ref = key_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
key_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string key = 1;
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string key = 1;
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
* string key = 1;
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
* string key = 1;
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value;
onChanged();
return this;
}
private java.lang.Object value_ = "";
/**
* string value = 2;
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string value = 2;
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string value = 2;
*/
public Builder setValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
return this;
}
/**
* string value = 2;
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
/**
* string value = 2;
*/
public Builder setValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
value_ = value;
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:metapb.StoreLabel)
}
// @@protoc_insertion_point(class_scope:metapb.StoreLabel)
private static final org.tikv.kvproto.Metapb.StoreLabel DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Metapb.StoreLabel();
}
public static org.tikv.kvproto.Metapb.StoreLabel getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public StoreLabel parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StoreLabel(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tikv.kvproto.Metapb.StoreLabel getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StoreOrBuilder extends
// @@protoc_insertion_point(interface_extends:metapb.Store)
com.google.protobuf.MessageOrBuilder {
/**
* uint64 id = 1;
*/
long getId();
/**
*
* Address to handle client requests (kv, cop, etc.)
*
*
* string address = 2;
*/
java.lang.String getAddress();
/**
*
* Address to handle client requests (kv, cop, etc.)
*
*
* string address = 2;
*/
com.google.protobuf.ByteString
getAddressBytes();
/**
* .metapb.StoreState state = 3;
*/
int getStateValue();
/**
* .metapb.StoreState state = 3;
*/
org.tikv.kvproto.Metapb.StoreState getState();
/**
* repeated .metapb.StoreLabel labels = 4;
*/
java.util.List
getLabelsList();
/**
* repeated .metapb.StoreLabel labels = 4;
*/
org.tikv.kvproto.Metapb.StoreLabel getLabels(int index);
/**
* repeated .metapb.StoreLabel labels = 4;
*/
int getLabelsCount();
/**
* repeated .metapb.StoreLabel labels = 4;
*/
java.util.List extends org.tikv.kvproto.Metapb.StoreLabelOrBuilder>
getLabelsOrBuilderList();
/**
* repeated .metapb.StoreLabel labels = 4;
*/
org.tikv.kvproto.Metapb.StoreLabelOrBuilder getLabelsOrBuilder(
int index);
/**
* string version = 5;
*/
java.lang.String getVersion();
/**
* string version = 5;
*/
com.google.protobuf.ByteString
getVersionBytes();
/**
*
* Address to handle peer requests (raft messages from other store).
* Empty means same as address.
*
*
* string peer_address = 6;
*/
java.lang.String getPeerAddress();
/**
*
* Address to handle peer requests (raft messages from other store).
* Empty means same as address.
*
*
* string peer_address = 6;
*/
com.google.protobuf.ByteString
getPeerAddressBytes();
/**
*
* Status address provides the HTTP service for external components
*
*
* string status_address = 7;
*/
java.lang.String getStatusAddress();
/**
*
* Status address provides the HTTP service for external components
*
*
* string status_address = 7;
*/
com.google.protobuf.ByteString
getStatusAddressBytes();
/**
* string git_hash = 8;
*/
java.lang.String getGitHash();
/**
* string git_hash = 8;
*/
com.google.protobuf.ByteString
getGitHashBytes();
/**
*
* The start timestamp of the current store
*
*
* int64 start_timestamp = 9;
*/
long getStartTimestamp();
/**
* string deploy_path = 10;
*/
java.lang.String getDeployPath();
/**
* string deploy_path = 10;
*/
com.google.protobuf.ByteString
getDeployPathBytes();
/**
*
* The last heartbeat timestamp of the store.
*
*
* int64 last_heartbeat = 11;
*/
long getLastHeartbeat();
/**
*
* If the store is physically destroyed, which means it can never up again.
*
*
* bool physically_destroyed = 12;
*/
boolean getPhysicallyDestroyed();
}
/**
* Protobuf type {@code metapb.Store}
*/
public static final class Store extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:metapb.Store)
StoreOrBuilder {
private static final long serialVersionUID = 0L;
// Use Store.newBuilder() to construct.
private Store(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Store() {
id_ = 0L;
address_ = "";
state_ = 0;
labels_ = java.util.Collections.emptyList();
version_ = "";
peerAddress_ = "";
statusAddress_ = "";
gitHash_ = "";
startTimestamp_ = 0L;
deployPath_ = "";
lastHeartbeat_ = 0L;
physicallyDestroyed_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Store(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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();
address_ = s;
break;
}
case 24: {
int rawValue = input.readEnum();
state_ = rawValue;
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
labels_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
labels_.add(
input.readMessage(org.tikv.kvproto.Metapb.StoreLabel.parser(), extensionRegistry));
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
version_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
peerAddress_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
statusAddress_ = s;
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
gitHash_ = s;
break;
}
case 72: {
startTimestamp_ = input.readInt64();
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
deployPath_ = s;
break;
}
case 88: {
lastHeartbeat_ = input.readInt64();
break;
}
case 96: {
physicallyDestroyed_ = 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_ & 0x00000008) == 0x00000008)) {
labels_ = java.util.Collections.unmodifiableList(labels_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Store_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Store_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Metapb.Store.class, org.tikv.kvproto.Metapb.Store.Builder.class);
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
private long id_;
/**
* uint64 id = 1;
*/
public long getId() {
return id_;
}
public static final int ADDRESS_FIELD_NUMBER = 2;
private volatile java.lang.Object address_;
/**
*
* Address to handle client requests (kv, cop, etc.)
*
*
* string address = 2;
*/
public java.lang.String getAddress() {
java.lang.Object ref = address_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
address_ = s;
return s;
}
}
/**
*
* Address to handle client requests (kv, cop, etc.)
*
*
* string address = 2;
*/
public com.google.protobuf.ByteString
getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATE_FIELD_NUMBER = 3;
private int state_;
/**
* .metapb.StoreState state = 3;
*/
public int getStateValue() {
return state_;
}
/**
* .metapb.StoreState state = 3;
*/
public org.tikv.kvproto.Metapb.StoreState getState() {
org.tikv.kvproto.Metapb.StoreState result = org.tikv.kvproto.Metapb.StoreState.valueOf(state_);
return result == null ? org.tikv.kvproto.Metapb.StoreState.UNRECOGNIZED : result;
}
public static final int LABELS_FIELD_NUMBER = 4;
private java.util.List labels_;
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public java.util.List getLabelsList() {
return labels_;
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public java.util.List extends org.tikv.kvproto.Metapb.StoreLabelOrBuilder>
getLabelsOrBuilderList() {
return labels_;
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public int getLabelsCount() {
return labels_.size();
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public org.tikv.kvproto.Metapb.StoreLabel getLabels(int index) {
return labels_.get(index);
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public org.tikv.kvproto.Metapb.StoreLabelOrBuilder getLabelsOrBuilder(
int index) {
return labels_.get(index);
}
public static final int VERSION_FIELD_NUMBER = 5;
private volatile java.lang.Object version_;
/**
* string version = 5;
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
}
}
/**
* string version = 5;
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PEER_ADDRESS_FIELD_NUMBER = 6;
private volatile java.lang.Object peerAddress_;
/**
*
* Address to handle peer requests (raft messages from other store).
* Empty means same as address.
*
*
* string peer_address = 6;
*/
public java.lang.String getPeerAddress() {
java.lang.Object ref = peerAddress_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
peerAddress_ = s;
return s;
}
}
/**
*
* Address to handle peer requests (raft messages from other store).
* Empty means same as address.
*
*
* string peer_address = 6;
*/
public com.google.protobuf.ByteString
getPeerAddressBytes() {
java.lang.Object ref = peerAddress_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
peerAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATUS_ADDRESS_FIELD_NUMBER = 7;
private volatile java.lang.Object statusAddress_;
/**
*
* Status address provides the HTTP service for external components
*
*
* string status_address = 7;
*/
public java.lang.String getStatusAddress() {
java.lang.Object ref = statusAddress_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
statusAddress_ = s;
return s;
}
}
/**
*
* Status address provides the HTTP service for external components
*
*
* string status_address = 7;
*/
public com.google.protobuf.ByteString
getStatusAddressBytes() {
java.lang.Object ref = statusAddress_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
statusAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int GIT_HASH_FIELD_NUMBER = 8;
private volatile java.lang.Object gitHash_;
/**
* string git_hash = 8;
*/
public java.lang.String getGitHash() {
java.lang.Object ref = gitHash_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
gitHash_ = s;
return s;
}
}
/**
* string git_hash = 8;
*/
public com.google.protobuf.ByteString
getGitHashBytes() {
java.lang.Object ref = gitHash_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
gitHash_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int START_TIMESTAMP_FIELD_NUMBER = 9;
private long startTimestamp_;
/**
*
* The start timestamp of the current store
*
*
* int64 start_timestamp = 9;
*/
public long getStartTimestamp() {
return startTimestamp_;
}
public static final int DEPLOY_PATH_FIELD_NUMBER = 10;
private volatile java.lang.Object deployPath_;
/**
* string deploy_path = 10;
*/
public java.lang.String getDeployPath() {
java.lang.Object ref = deployPath_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
deployPath_ = s;
return s;
}
}
/**
* string deploy_path = 10;
*/
public com.google.protobuf.ByteString
getDeployPathBytes() {
java.lang.Object ref = deployPath_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deployPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LAST_HEARTBEAT_FIELD_NUMBER = 11;
private long lastHeartbeat_;
/**
*
* The last heartbeat timestamp of the store.
*
*
* int64 last_heartbeat = 11;
*/
public long getLastHeartbeat() {
return lastHeartbeat_;
}
public static final int PHYSICALLY_DESTROYED_FIELD_NUMBER = 12;
private boolean physicallyDestroyed_;
/**
*
* If the store is physically destroyed, which means it can never up again.
*
*
* bool physically_destroyed = 12;
*/
public boolean getPhysicallyDestroyed() {
return physicallyDestroyed_;
}
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 (id_ != 0L) {
output.writeUInt64(1, id_);
}
if (!getAddressBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, address_);
}
if (state_ != org.tikv.kvproto.Metapb.StoreState.Up.getNumber()) {
output.writeEnum(3, state_);
}
for (int i = 0; i < labels_.size(); i++) {
output.writeMessage(4, labels_.get(i));
}
if (!getVersionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, version_);
}
if (!getPeerAddressBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, peerAddress_);
}
if (!getStatusAddressBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, statusAddress_);
}
if (!getGitHashBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, gitHash_);
}
if (startTimestamp_ != 0L) {
output.writeInt64(9, startTimestamp_);
}
if (!getDeployPathBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, deployPath_);
}
if (lastHeartbeat_ != 0L) {
output.writeInt64(11, lastHeartbeat_);
}
if (physicallyDestroyed_ != false) {
output.writeBool(12, physicallyDestroyed_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, id_);
}
if (!getAddressBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, address_);
}
if (state_ != org.tikv.kvproto.Metapb.StoreState.Up.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, state_);
}
for (int i = 0; i < labels_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, labels_.get(i));
}
if (!getVersionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, version_);
}
if (!getPeerAddressBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, peerAddress_);
}
if (!getStatusAddressBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, statusAddress_);
}
if (!getGitHashBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, gitHash_);
}
if (startTimestamp_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(9, startTimestamp_);
}
if (!getDeployPathBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, deployPath_);
}
if (lastHeartbeat_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(11, lastHeartbeat_);
}
if (physicallyDestroyed_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(12, physicallyDestroyed_);
}
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 org.tikv.kvproto.Metapb.Store)) {
return super.equals(obj);
}
org.tikv.kvproto.Metapb.Store other = (org.tikv.kvproto.Metapb.Store) obj;
boolean result = true;
result = result && (getId()
== other.getId());
result = result && getAddress()
.equals(other.getAddress());
result = result && state_ == other.state_;
result = result && getLabelsList()
.equals(other.getLabelsList());
result = result && getVersion()
.equals(other.getVersion());
result = result && getPeerAddress()
.equals(other.getPeerAddress());
result = result && getStatusAddress()
.equals(other.getStatusAddress());
result = result && getGitHash()
.equals(other.getGitHash());
result = result && (getStartTimestamp()
== other.getStartTimestamp());
result = result && getDeployPath()
.equals(other.getDeployPath());
result = result && (getLastHeartbeat()
== other.getLastHeartbeat());
result = result && (getPhysicallyDestroyed()
== other.getPhysicallyDestroyed());
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) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
hash = (37 * hash) + ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getAddress().hashCode();
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
if (getLabelsCount() > 0) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + getLabelsList().hashCode();
}
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
hash = (37 * hash) + PEER_ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getPeerAddress().hashCode();
hash = (37 * hash) + STATUS_ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getStatusAddress().hashCode();
hash = (37 * hash) + GIT_HASH_FIELD_NUMBER;
hash = (53 * hash) + getGitHash().hashCode();
hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartTimestamp());
hash = (37 * hash) + DEPLOY_PATH_FIELD_NUMBER;
hash = (53 * hash) + getDeployPath().hashCode();
hash = (37 * hash) + LAST_HEARTBEAT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLastHeartbeat());
hash = (37 * hash) + PHYSICALLY_DESTROYED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getPhysicallyDestroyed());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Metapb.Store parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.Store parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.Store parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.Store parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.Store parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.Store parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.Store parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.Store 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 org.tikv.kvproto.Metapb.Store parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.Store 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 org.tikv.kvproto.Metapb.Store parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.Store 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(org.tikv.kvproto.Metapb.Store 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 metapb.Store}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:metapb.Store)
org.tikv.kvproto.Metapb.StoreOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Store_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Store_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Metapb.Store.class, org.tikv.kvproto.Metapb.Store.Builder.class);
}
// Construct using org.tikv.kvproto.Metapb.Store.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLabelsFieldBuilder();
}
}
public Builder clear() {
super.clear();
id_ = 0L;
address_ = "";
state_ = 0;
if (labelsBuilder_ == null) {
labels_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
labelsBuilder_.clear();
}
version_ = "";
peerAddress_ = "";
statusAddress_ = "";
gitHash_ = "";
startTimestamp_ = 0L;
deployPath_ = "";
lastHeartbeat_ = 0L;
physicallyDestroyed_ = false;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Store_descriptor;
}
public org.tikv.kvproto.Metapb.Store getDefaultInstanceForType() {
return org.tikv.kvproto.Metapb.Store.getDefaultInstance();
}
public org.tikv.kvproto.Metapb.Store build() {
org.tikv.kvproto.Metapb.Store result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.Metapb.Store buildPartial() {
org.tikv.kvproto.Metapb.Store result = new org.tikv.kvproto.Metapb.Store(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.id_ = id_;
result.address_ = address_;
result.state_ = state_;
if (labelsBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)) {
labels_ = java.util.Collections.unmodifiableList(labels_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.labels_ = labels_;
} else {
result.labels_ = labelsBuilder_.build();
}
result.version_ = version_;
result.peerAddress_ = peerAddress_;
result.statusAddress_ = statusAddress_;
result.gitHash_ = gitHash_;
result.startTimestamp_ = startTimestamp_;
result.deployPath_ = deployPath_;
result.lastHeartbeat_ = lastHeartbeat_;
result.physicallyDestroyed_ = physicallyDestroyed_;
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 org.tikv.kvproto.Metapb.Store) {
return mergeFrom((org.tikv.kvproto.Metapb.Store)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.Metapb.Store other) {
if (other == org.tikv.kvproto.Metapb.Store.getDefaultInstance()) return this;
if (other.getId() != 0L) {
setId(other.getId());
}
if (!other.getAddress().isEmpty()) {
address_ = other.address_;
onChanged();
}
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (labelsBuilder_ == null) {
if (!other.labels_.isEmpty()) {
if (labels_.isEmpty()) {
labels_ = other.labels_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureLabelsIsMutable();
labels_.addAll(other.labels_);
}
onChanged();
}
} else {
if (!other.labels_.isEmpty()) {
if (labelsBuilder_.isEmpty()) {
labelsBuilder_.dispose();
labelsBuilder_ = null;
labels_ = other.labels_;
bitField0_ = (bitField0_ & ~0x00000008);
labelsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLabelsFieldBuilder() : null;
} else {
labelsBuilder_.addAllMessages(other.labels_);
}
}
}
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
onChanged();
}
if (!other.getPeerAddress().isEmpty()) {
peerAddress_ = other.peerAddress_;
onChanged();
}
if (!other.getStatusAddress().isEmpty()) {
statusAddress_ = other.statusAddress_;
onChanged();
}
if (!other.getGitHash().isEmpty()) {
gitHash_ = other.gitHash_;
onChanged();
}
if (other.getStartTimestamp() != 0L) {
setStartTimestamp(other.getStartTimestamp());
}
if (!other.getDeployPath().isEmpty()) {
deployPath_ = other.deployPath_;
onChanged();
}
if (other.getLastHeartbeat() != 0L) {
setLastHeartbeat(other.getLastHeartbeat());
}
if (other.getPhysicallyDestroyed() != false) {
setPhysicallyDestroyed(other.getPhysicallyDestroyed());
}
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 {
org.tikv.kvproto.Metapb.Store parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.Metapb.Store) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long id_ ;
/**
* uint64 id = 1;
*/
public long getId() {
return id_;
}
/**
* uint64 id = 1;
*/
public Builder setId(long value) {
id_ = value;
onChanged();
return this;
}
/**
* uint64 id = 1;
*/
public Builder clearId() {
id_ = 0L;
onChanged();
return this;
}
private java.lang.Object address_ = "";
/**
*
* Address to handle client requests (kv, cop, etc.)
*
*
* string address = 2;
*/
public java.lang.String getAddress() {
java.lang.Object ref = address_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
address_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Address to handle client requests (kv, cop, etc.)
*
*
* string address = 2;
*/
public com.google.protobuf.ByteString
getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Address to handle client requests (kv, cop, etc.)
*
*
* string address = 2;
*/
public Builder setAddress(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
address_ = value;
onChanged();
return this;
}
/**
*
* Address to handle client requests (kv, cop, etc.)
*
*
* string address = 2;
*/
public Builder clearAddress() {
address_ = getDefaultInstance().getAddress();
onChanged();
return this;
}
/**
*
* Address to handle client requests (kv, cop, etc.)
*
*
* string address = 2;
*/
public Builder setAddressBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
address_ = value;
onChanged();
return this;
}
private int state_ = 0;
/**
* .metapb.StoreState state = 3;
*/
public int getStateValue() {
return state_;
}
/**
* .metapb.StoreState state = 3;
*/
public Builder setStateValue(int value) {
state_ = value;
onChanged();
return this;
}
/**
* .metapb.StoreState state = 3;
*/
public org.tikv.kvproto.Metapb.StoreState getState() {
org.tikv.kvproto.Metapb.StoreState result = org.tikv.kvproto.Metapb.StoreState.valueOf(state_);
return result == null ? org.tikv.kvproto.Metapb.StoreState.UNRECOGNIZED : result;
}
/**
* .metapb.StoreState state = 3;
*/
public Builder setState(org.tikv.kvproto.Metapb.StoreState value) {
if (value == null) {
throw new NullPointerException();
}
state_ = value.getNumber();
onChanged();
return this;
}
/**
* .metapb.StoreState state = 3;
*/
public Builder clearState() {
state_ = 0;
onChanged();
return this;
}
private java.util.List labels_ =
java.util.Collections.emptyList();
private void ensureLabelsIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
labels_ = new java.util.ArrayList(labels_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tikv.kvproto.Metapb.StoreLabel, org.tikv.kvproto.Metapb.StoreLabel.Builder, org.tikv.kvproto.Metapb.StoreLabelOrBuilder> labelsBuilder_;
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public java.util.List getLabelsList() {
if (labelsBuilder_ == null) {
return java.util.Collections.unmodifiableList(labels_);
} else {
return labelsBuilder_.getMessageList();
}
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public int getLabelsCount() {
if (labelsBuilder_ == null) {
return labels_.size();
} else {
return labelsBuilder_.getCount();
}
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public org.tikv.kvproto.Metapb.StoreLabel getLabels(int index) {
if (labelsBuilder_ == null) {
return labels_.get(index);
} else {
return labelsBuilder_.getMessage(index);
}
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public Builder setLabels(
int index, org.tikv.kvproto.Metapb.StoreLabel value) {
if (labelsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelsIsMutable();
labels_.set(index, value);
onChanged();
} else {
labelsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public Builder setLabels(
int index, org.tikv.kvproto.Metapb.StoreLabel.Builder builderForValue) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
labels_.set(index, builderForValue.build());
onChanged();
} else {
labelsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public Builder addLabels(org.tikv.kvproto.Metapb.StoreLabel value) {
if (labelsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelsIsMutable();
labels_.add(value);
onChanged();
} else {
labelsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public Builder addLabels(
int index, org.tikv.kvproto.Metapb.StoreLabel value) {
if (labelsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelsIsMutable();
labels_.add(index, value);
onChanged();
} else {
labelsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public Builder addLabels(
org.tikv.kvproto.Metapb.StoreLabel.Builder builderForValue) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
labels_.add(builderForValue.build());
onChanged();
} else {
labelsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public Builder addLabels(
int index, org.tikv.kvproto.Metapb.StoreLabel.Builder builderForValue) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
labels_.add(index, builderForValue.build());
onChanged();
} else {
labelsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public Builder addAllLabels(
java.lang.Iterable extends org.tikv.kvproto.Metapb.StoreLabel> values) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, labels_);
onChanged();
} else {
labelsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public Builder clearLabels() {
if (labelsBuilder_ == null) {
labels_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
labelsBuilder_.clear();
}
return this;
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public Builder removeLabels(int index) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
labels_.remove(index);
onChanged();
} else {
labelsBuilder_.remove(index);
}
return this;
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public org.tikv.kvproto.Metapb.StoreLabel.Builder getLabelsBuilder(
int index) {
return getLabelsFieldBuilder().getBuilder(index);
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public org.tikv.kvproto.Metapb.StoreLabelOrBuilder getLabelsOrBuilder(
int index) {
if (labelsBuilder_ == null) {
return labels_.get(index); } else {
return labelsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public java.util.List extends org.tikv.kvproto.Metapb.StoreLabelOrBuilder>
getLabelsOrBuilderList() {
if (labelsBuilder_ != null) {
return labelsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(labels_);
}
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public org.tikv.kvproto.Metapb.StoreLabel.Builder addLabelsBuilder() {
return getLabelsFieldBuilder().addBuilder(
org.tikv.kvproto.Metapb.StoreLabel.getDefaultInstance());
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public org.tikv.kvproto.Metapb.StoreLabel.Builder addLabelsBuilder(
int index) {
return getLabelsFieldBuilder().addBuilder(
index, org.tikv.kvproto.Metapb.StoreLabel.getDefaultInstance());
}
/**
* repeated .metapb.StoreLabel labels = 4;
*/
public java.util.List
getLabelsBuilderList() {
return getLabelsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tikv.kvproto.Metapb.StoreLabel, org.tikv.kvproto.Metapb.StoreLabel.Builder, org.tikv.kvproto.Metapb.StoreLabelOrBuilder>
getLabelsFieldBuilder() {
if (labelsBuilder_ == null) {
labelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tikv.kvproto.Metapb.StoreLabel, org.tikv.kvproto.Metapb.StoreLabel.Builder, org.tikv.kvproto.Metapb.StoreLabelOrBuilder>(
labels_,
((bitField0_ & 0x00000008) == 0x00000008),
getParentForChildren(),
isClean());
labels_ = null;
}
return labelsBuilder_;
}
private java.lang.Object version_ = "";
/**
* string version = 5;
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string version = 5;
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string version = 5;
*/
public Builder setVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
version_ = value;
onChanged();
return this;
}
/**
* string version = 5;
*/
public Builder clearVersion() {
version_ = getDefaultInstance().getVersion();
onChanged();
return this;
}
/**
* string version = 5;
*/
public Builder setVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
version_ = value;
onChanged();
return this;
}
private java.lang.Object peerAddress_ = "";
/**
*
* Address to handle peer requests (raft messages from other store).
* Empty means same as address.
*
*
* string peer_address = 6;
*/
public java.lang.String getPeerAddress() {
java.lang.Object ref = peerAddress_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
peerAddress_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Address to handle peer requests (raft messages from other store).
* Empty means same as address.
*
*
* string peer_address = 6;
*/
public com.google.protobuf.ByteString
getPeerAddressBytes() {
java.lang.Object ref = peerAddress_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
peerAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Address to handle peer requests (raft messages from other store).
* Empty means same as address.
*
*
* string peer_address = 6;
*/
public Builder setPeerAddress(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
peerAddress_ = value;
onChanged();
return this;
}
/**
*
* Address to handle peer requests (raft messages from other store).
* Empty means same as address.
*
*
* string peer_address = 6;
*/
public Builder clearPeerAddress() {
peerAddress_ = getDefaultInstance().getPeerAddress();
onChanged();
return this;
}
/**
*
* Address to handle peer requests (raft messages from other store).
* Empty means same as address.
*
*
* string peer_address = 6;
*/
public Builder setPeerAddressBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
peerAddress_ = value;
onChanged();
return this;
}
private java.lang.Object statusAddress_ = "";
/**
*
* Status address provides the HTTP service for external components
*
*
* string status_address = 7;
*/
public java.lang.String getStatusAddress() {
java.lang.Object ref = statusAddress_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
statusAddress_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Status address provides the HTTP service for external components
*
*
* string status_address = 7;
*/
public com.google.protobuf.ByteString
getStatusAddressBytes() {
java.lang.Object ref = statusAddress_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
statusAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Status address provides the HTTP service for external components
*
*
* string status_address = 7;
*/
public Builder setStatusAddress(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
statusAddress_ = value;
onChanged();
return this;
}
/**
*
* Status address provides the HTTP service for external components
*
*
* string status_address = 7;
*/
public Builder clearStatusAddress() {
statusAddress_ = getDefaultInstance().getStatusAddress();
onChanged();
return this;
}
/**
*
* Status address provides the HTTP service for external components
*
*
* string status_address = 7;
*/
public Builder setStatusAddressBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
statusAddress_ = value;
onChanged();
return this;
}
private java.lang.Object gitHash_ = "";
/**
* string git_hash = 8;
*/
public java.lang.String getGitHash() {
java.lang.Object ref = gitHash_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
gitHash_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string git_hash = 8;
*/
public com.google.protobuf.ByteString
getGitHashBytes() {
java.lang.Object ref = gitHash_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
gitHash_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string git_hash = 8;
*/
public Builder setGitHash(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
gitHash_ = value;
onChanged();
return this;
}
/**
* string git_hash = 8;
*/
public Builder clearGitHash() {
gitHash_ = getDefaultInstance().getGitHash();
onChanged();
return this;
}
/**
* string git_hash = 8;
*/
public Builder setGitHashBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
gitHash_ = value;
onChanged();
return this;
}
private long startTimestamp_ ;
/**
*
* The start timestamp of the current store
*
*
* int64 start_timestamp = 9;
*/
public long getStartTimestamp() {
return startTimestamp_;
}
/**
*
* The start timestamp of the current store
*
*
* int64 start_timestamp = 9;
*/
public Builder setStartTimestamp(long value) {
startTimestamp_ = value;
onChanged();
return this;
}
/**
*
* The start timestamp of the current store
*
*
* int64 start_timestamp = 9;
*/
public Builder clearStartTimestamp() {
startTimestamp_ = 0L;
onChanged();
return this;
}
private java.lang.Object deployPath_ = "";
/**
* string deploy_path = 10;
*/
public java.lang.String getDeployPath() {
java.lang.Object ref = deployPath_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
deployPath_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string deploy_path = 10;
*/
public com.google.protobuf.ByteString
getDeployPathBytes() {
java.lang.Object ref = deployPath_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deployPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string deploy_path = 10;
*/
public Builder setDeployPath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
deployPath_ = value;
onChanged();
return this;
}
/**
* string deploy_path = 10;
*/
public Builder clearDeployPath() {
deployPath_ = getDefaultInstance().getDeployPath();
onChanged();
return this;
}
/**
* string deploy_path = 10;
*/
public Builder setDeployPathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
deployPath_ = value;
onChanged();
return this;
}
private long lastHeartbeat_ ;
/**
*
* The last heartbeat timestamp of the store.
*
*
* int64 last_heartbeat = 11;
*/
public long getLastHeartbeat() {
return lastHeartbeat_;
}
/**
*
* The last heartbeat timestamp of the store.
*
*
* int64 last_heartbeat = 11;
*/
public Builder setLastHeartbeat(long value) {
lastHeartbeat_ = value;
onChanged();
return this;
}
/**
*
* The last heartbeat timestamp of the store.
*
*
* int64 last_heartbeat = 11;
*/
public Builder clearLastHeartbeat() {
lastHeartbeat_ = 0L;
onChanged();
return this;
}
private boolean physicallyDestroyed_ ;
/**
*
* If the store is physically destroyed, which means it can never up again.
*
*
* bool physically_destroyed = 12;
*/
public boolean getPhysicallyDestroyed() {
return physicallyDestroyed_;
}
/**
*
* If the store is physically destroyed, which means it can never up again.
*
*
* bool physically_destroyed = 12;
*/
public Builder setPhysicallyDestroyed(boolean value) {
physicallyDestroyed_ = value;
onChanged();
return this;
}
/**
*
* If the store is physically destroyed, which means it can never up again.
*
*
* bool physically_destroyed = 12;
*/
public Builder clearPhysicallyDestroyed() {
physicallyDestroyed_ = 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:metapb.Store)
}
// @@protoc_insertion_point(class_scope:metapb.Store)
private static final org.tikv.kvproto.Metapb.Store DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Metapb.Store();
}
public static org.tikv.kvproto.Metapb.Store getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Store parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Store(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tikv.kvproto.Metapb.Store getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RegionEpochOrBuilder extends
// @@protoc_insertion_point(interface_extends:metapb.RegionEpoch)
com.google.protobuf.MessageOrBuilder {
/**
*
* Conf change version, auto increment when add or remove peer
*
*
* uint64 conf_ver = 1;
*/
long getConfVer();
/**
*
* Region version, auto increment when split or merge
*
*
* uint64 version = 2;
*/
long getVersion();
}
/**
* Protobuf type {@code metapb.RegionEpoch}
*/
public static final class RegionEpoch extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:metapb.RegionEpoch)
RegionEpochOrBuilder {
private static final long serialVersionUID = 0L;
// Use RegionEpoch.newBuilder() to construct.
private RegionEpoch(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RegionEpoch() {
confVer_ = 0L;
version_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RegionEpoch(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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: {
confVer_ = input.readUInt64();
break;
}
case 16: {
version_ = 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 org.tikv.kvproto.Metapb.internal_static_metapb_RegionEpoch_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Metapb.internal_static_metapb_RegionEpoch_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Metapb.RegionEpoch.class, org.tikv.kvproto.Metapb.RegionEpoch.Builder.class);
}
public static final int CONF_VER_FIELD_NUMBER = 1;
private long confVer_;
/**
*
* Conf change version, auto increment when add or remove peer
*
*
* uint64 conf_ver = 1;
*/
public long getConfVer() {
return confVer_;
}
public static final int VERSION_FIELD_NUMBER = 2;
private long version_;
/**
*
* Region version, auto increment when split or merge
*
*
* uint64 version = 2;
*/
public long getVersion() {
return version_;
}
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 (confVer_ != 0L) {
output.writeUInt64(1, confVer_);
}
if (version_ != 0L) {
output.writeUInt64(2, version_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (confVer_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, confVer_);
}
if (version_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, version_);
}
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 org.tikv.kvproto.Metapb.RegionEpoch)) {
return super.equals(obj);
}
org.tikv.kvproto.Metapb.RegionEpoch other = (org.tikv.kvproto.Metapb.RegionEpoch) obj;
boolean result = true;
result = result && (getConfVer()
== other.getConfVer());
result = result && (getVersion()
== other.getVersion());
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) + CONF_VER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getConfVer());
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getVersion());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Metapb.RegionEpoch parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.RegionEpoch parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.RegionEpoch parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.RegionEpoch parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.RegionEpoch parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.RegionEpoch parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.RegionEpoch parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.RegionEpoch 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 org.tikv.kvproto.Metapb.RegionEpoch parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.RegionEpoch 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 org.tikv.kvproto.Metapb.RegionEpoch parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.RegionEpoch 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(org.tikv.kvproto.Metapb.RegionEpoch 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 metapb.RegionEpoch}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:metapb.RegionEpoch)
org.tikv.kvproto.Metapb.RegionEpochOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Metapb.internal_static_metapb_RegionEpoch_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Metapb.internal_static_metapb_RegionEpoch_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Metapb.RegionEpoch.class, org.tikv.kvproto.Metapb.RegionEpoch.Builder.class);
}
// Construct using org.tikv.kvproto.Metapb.RegionEpoch.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();
confVer_ = 0L;
version_ = 0L;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.Metapb.internal_static_metapb_RegionEpoch_descriptor;
}
public org.tikv.kvproto.Metapb.RegionEpoch getDefaultInstanceForType() {
return org.tikv.kvproto.Metapb.RegionEpoch.getDefaultInstance();
}
public org.tikv.kvproto.Metapb.RegionEpoch build() {
org.tikv.kvproto.Metapb.RegionEpoch result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.Metapb.RegionEpoch buildPartial() {
org.tikv.kvproto.Metapb.RegionEpoch result = new org.tikv.kvproto.Metapb.RegionEpoch(this);
result.confVer_ = confVer_;
result.version_ = version_;
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 org.tikv.kvproto.Metapb.RegionEpoch) {
return mergeFrom((org.tikv.kvproto.Metapb.RegionEpoch)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.Metapb.RegionEpoch other) {
if (other == org.tikv.kvproto.Metapb.RegionEpoch.getDefaultInstance()) return this;
if (other.getConfVer() != 0L) {
setConfVer(other.getConfVer());
}
if (other.getVersion() != 0L) {
setVersion(other.getVersion());
}
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 {
org.tikv.kvproto.Metapb.RegionEpoch parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.Metapb.RegionEpoch) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long confVer_ ;
/**
*
* Conf change version, auto increment when add or remove peer
*
*
* uint64 conf_ver = 1;
*/
public long getConfVer() {
return confVer_;
}
/**
*
* Conf change version, auto increment when add or remove peer
*
*
* uint64 conf_ver = 1;
*/
public Builder setConfVer(long value) {
confVer_ = value;
onChanged();
return this;
}
/**
*
* Conf change version, auto increment when add or remove peer
*
*
* uint64 conf_ver = 1;
*/
public Builder clearConfVer() {
confVer_ = 0L;
onChanged();
return this;
}
private long version_ ;
/**
*
* Region version, auto increment when split or merge
*
*
* uint64 version = 2;
*/
public long getVersion() {
return version_;
}
/**
*
* Region version, auto increment when split or merge
*
*
* uint64 version = 2;
*/
public Builder setVersion(long value) {
version_ = value;
onChanged();
return this;
}
/**
*
* Region version, auto increment when split or merge
*
*
* uint64 version = 2;
*/
public Builder clearVersion() {
version_ = 0L;
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:metapb.RegionEpoch)
}
// @@protoc_insertion_point(class_scope:metapb.RegionEpoch)
private static final org.tikv.kvproto.Metapb.RegionEpoch DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Metapb.RegionEpoch();
}
public static org.tikv.kvproto.Metapb.RegionEpoch getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public RegionEpoch parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RegionEpoch(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tikv.kvproto.Metapb.RegionEpoch getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RegionOrBuilder extends
// @@protoc_insertion_point(interface_extends:metapb.Region)
com.google.protobuf.MessageOrBuilder {
/**
* uint64 id = 1;
*/
long getId();
/**
*
* Region key range [start_key, end_key).
*
*
* bytes start_key = 2;
*/
com.google.protobuf.ByteString getStartKey();
/**
* bytes end_key = 3;
*/
com.google.protobuf.ByteString getEndKey();
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
boolean hasRegionEpoch();
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
org.tikv.kvproto.Metapb.RegionEpoch getRegionEpoch();
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
org.tikv.kvproto.Metapb.RegionEpochOrBuilder getRegionEpochOrBuilder();
/**
* repeated .metapb.Peer peers = 5;
*/
java.util.List
getPeersList();
/**
* repeated .metapb.Peer peers = 5;
*/
org.tikv.kvproto.Metapb.Peer getPeers(int index);
/**
* repeated .metapb.Peer peers = 5;
*/
int getPeersCount();
/**
* repeated .metapb.Peer peers = 5;
*/
java.util.List extends org.tikv.kvproto.Metapb.PeerOrBuilder>
getPeersOrBuilderList();
/**
* repeated .metapb.Peer peers = 5;
*/
org.tikv.kvproto.Metapb.PeerOrBuilder getPeersOrBuilder(
int index);
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
boolean hasEncryptionMeta();
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
org.tikv.kvproto.Encryptionpb.EncryptionMeta getEncryptionMeta();
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
org.tikv.kvproto.Encryptionpb.EncryptionMetaOrBuilder getEncryptionMetaOrBuilder();
}
/**
* Protobuf type {@code metapb.Region}
*/
public static final class Region extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:metapb.Region)
RegionOrBuilder {
private static final long serialVersionUID = 0L;
// Use Region.newBuilder() to construct.
private Region(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Region() {
id_ = 0L;
startKey_ = com.google.protobuf.ByteString.EMPTY;
endKey_ = com.google.protobuf.ByteString.EMPTY;
peers_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Region(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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: {
startKey_ = input.readBytes();
break;
}
case 26: {
endKey_ = input.readBytes();
break;
}
case 34: {
org.tikv.kvproto.Metapb.RegionEpoch.Builder subBuilder = null;
if (regionEpoch_ != null) {
subBuilder = regionEpoch_.toBuilder();
}
regionEpoch_ = input.readMessage(org.tikv.kvproto.Metapb.RegionEpoch.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(regionEpoch_);
regionEpoch_ = subBuilder.buildPartial();
}
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
peers_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
peers_.add(
input.readMessage(org.tikv.kvproto.Metapb.Peer.parser(), extensionRegistry));
break;
}
case 50: {
org.tikv.kvproto.Encryptionpb.EncryptionMeta.Builder subBuilder = null;
if (encryptionMeta_ != null) {
subBuilder = encryptionMeta_.toBuilder();
}
encryptionMeta_ = input.readMessage(org.tikv.kvproto.Encryptionpb.EncryptionMeta.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(encryptionMeta_);
encryptionMeta_ = 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 {
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
peers_ = java.util.Collections.unmodifiableList(peers_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Region_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Region_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Metapb.Region.class, org.tikv.kvproto.Metapb.Region.Builder.class);
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
private long id_;
/**
* uint64 id = 1;
*/
public long getId() {
return id_;
}
public static final int START_KEY_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString startKey_;
/**
*
* Region key range [start_key, end_key).
*
*
* bytes start_key = 2;
*/
public com.google.protobuf.ByteString getStartKey() {
return startKey_;
}
public static final int END_KEY_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString endKey_;
/**
* bytes end_key = 3;
*/
public com.google.protobuf.ByteString getEndKey() {
return endKey_;
}
public static final int REGION_EPOCH_FIELD_NUMBER = 4;
private org.tikv.kvproto.Metapb.RegionEpoch regionEpoch_;
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
public boolean hasRegionEpoch() {
return regionEpoch_ != null;
}
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
public org.tikv.kvproto.Metapb.RegionEpoch getRegionEpoch() {
return regionEpoch_ == null ? org.tikv.kvproto.Metapb.RegionEpoch.getDefaultInstance() : regionEpoch_;
}
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
public org.tikv.kvproto.Metapb.RegionEpochOrBuilder getRegionEpochOrBuilder() {
return getRegionEpoch();
}
public static final int PEERS_FIELD_NUMBER = 5;
private java.util.List peers_;
/**
* repeated .metapb.Peer peers = 5;
*/
public java.util.List getPeersList() {
return peers_;
}
/**
* repeated .metapb.Peer peers = 5;
*/
public java.util.List extends org.tikv.kvproto.Metapb.PeerOrBuilder>
getPeersOrBuilderList() {
return peers_;
}
/**
* repeated .metapb.Peer peers = 5;
*/
public int getPeersCount() {
return peers_.size();
}
/**
* repeated .metapb.Peer peers = 5;
*/
public org.tikv.kvproto.Metapb.Peer getPeers(int index) {
return peers_.get(index);
}
/**
* repeated .metapb.Peer peers = 5;
*/
public org.tikv.kvproto.Metapb.PeerOrBuilder getPeersOrBuilder(
int index) {
return peers_.get(index);
}
public static final int ENCRYPTION_META_FIELD_NUMBER = 6;
private org.tikv.kvproto.Encryptionpb.EncryptionMeta encryptionMeta_;
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
public boolean hasEncryptionMeta() {
return encryptionMeta_ != null;
}
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
public org.tikv.kvproto.Encryptionpb.EncryptionMeta getEncryptionMeta() {
return encryptionMeta_ == null ? org.tikv.kvproto.Encryptionpb.EncryptionMeta.getDefaultInstance() : encryptionMeta_;
}
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
public org.tikv.kvproto.Encryptionpb.EncryptionMetaOrBuilder getEncryptionMetaOrBuilder() {
return getEncryptionMeta();
}
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 (id_ != 0L) {
output.writeUInt64(1, id_);
}
if (!startKey_.isEmpty()) {
output.writeBytes(2, startKey_);
}
if (!endKey_.isEmpty()) {
output.writeBytes(3, endKey_);
}
if (regionEpoch_ != null) {
output.writeMessage(4, getRegionEpoch());
}
for (int i = 0; i < peers_.size(); i++) {
output.writeMessage(5, peers_.get(i));
}
if (encryptionMeta_ != null) {
output.writeMessage(6, getEncryptionMeta());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, id_);
}
if (!startKey_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, startKey_);
}
if (!endKey_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, endKey_);
}
if (regionEpoch_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getRegionEpoch());
}
for (int i = 0; i < peers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, peers_.get(i));
}
if (encryptionMeta_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getEncryptionMeta());
}
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 org.tikv.kvproto.Metapb.Region)) {
return super.equals(obj);
}
org.tikv.kvproto.Metapb.Region other = (org.tikv.kvproto.Metapb.Region) obj;
boolean result = true;
result = result && (getId()
== other.getId());
result = result && getStartKey()
.equals(other.getStartKey());
result = result && getEndKey()
.equals(other.getEndKey());
result = result && (hasRegionEpoch() == other.hasRegionEpoch());
if (hasRegionEpoch()) {
result = result && getRegionEpoch()
.equals(other.getRegionEpoch());
}
result = result && getPeersList()
.equals(other.getPeersList());
result = result && (hasEncryptionMeta() == other.hasEncryptionMeta());
if (hasEncryptionMeta()) {
result = result && getEncryptionMeta()
.equals(other.getEncryptionMeta());
}
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) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
hash = (37 * hash) + START_KEY_FIELD_NUMBER;
hash = (53 * hash) + getStartKey().hashCode();
hash = (37 * hash) + END_KEY_FIELD_NUMBER;
hash = (53 * hash) + getEndKey().hashCode();
if (hasRegionEpoch()) {
hash = (37 * hash) + REGION_EPOCH_FIELD_NUMBER;
hash = (53 * hash) + getRegionEpoch().hashCode();
}
if (getPeersCount() > 0) {
hash = (37 * hash) + PEERS_FIELD_NUMBER;
hash = (53 * hash) + getPeersList().hashCode();
}
if (hasEncryptionMeta()) {
hash = (37 * hash) + ENCRYPTION_META_FIELD_NUMBER;
hash = (53 * hash) + getEncryptionMeta().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Metapb.Region parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.Region parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.Region parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.Region parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.Region parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.Region parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.Region parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.Region 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 org.tikv.kvproto.Metapb.Region parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.Region 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 org.tikv.kvproto.Metapb.Region parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.Region 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(org.tikv.kvproto.Metapb.Region 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 metapb.Region}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:metapb.Region)
org.tikv.kvproto.Metapb.RegionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Region_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Region_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Metapb.Region.class, org.tikv.kvproto.Metapb.Region.Builder.class);
}
// Construct using org.tikv.kvproto.Metapb.Region.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPeersFieldBuilder();
}
}
public Builder clear() {
super.clear();
id_ = 0L;
startKey_ = com.google.protobuf.ByteString.EMPTY;
endKey_ = com.google.protobuf.ByteString.EMPTY;
if (regionEpochBuilder_ == null) {
regionEpoch_ = null;
} else {
regionEpoch_ = null;
regionEpochBuilder_ = null;
}
if (peersBuilder_ == null) {
peers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
} else {
peersBuilder_.clear();
}
if (encryptionMetaBuilder_ == null) {
encryptionMeta_ = null;
} else {
encryptionMeta_ = null;
encryptionMetaBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Region_descriptor;
}
public org.tikv.kvproto.Metapb.Region getDefaultInstanceForType() {
return org.tikv.kvproto.Metapb.Region.getDefaultInstance();
}
public org.tikv.kvproto.Metapb.Region build() {
org.tikv.kvproto.Metapb.Region result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.Metapb.Region buildPartial() {
org.tikv.kvproto.Metapb.Region result = new org.tikv.kvproto.Metapb.Region(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.id_ = id_;
result.startKey_ = startKey_;
result.endKey_ = endKey_;
if (regionEpochBuilder_ == null) {
result.regionEpoch_ = regionEpoch_;
} else {
result.regionEpoch_ = regionEpochBuilder_.build();
}
if (peersBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010)) {
peers_ = java.util.Collections.unmodifiableList(peers_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.peers_ = peers_;
} else {
result.peers_ = peersBuilder_.build();
}
if (encryptionMetaBuilder_ == null) {
result.encryptionMeta_ = encryptionMeta_;
} else {
result.encryptionMeta_ = encryptionMetaBuilder_.build();
}
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 org.tikv.kvproto.Metapb.Region) {
return mergeFrom((org.tikv.kvproto.Metapb.Region)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.Metapb.Region other) {
if (other == org.tikv.kvproto.Metapb.Region.getDefaultInstance()) return this;
if (other.getId() != 0L) {
setId(other.getId());
}
if (other.getStartKey() != com.google.protobuf.ByteString.EMPTY) {
setStartKey(other.getStartKey());
}
if (other.getEndKey() != com.google.protobuf.ByteString.EMPTY) {
setEndKey(other.getEndKey());
}
if (other.hasRegionEpoch()) {
mergeRegionEpoch(other.getRegionEpoch());
}
if (peersBuilder_ == null) {
if (!other.peers_.isEmpty()) {
if (peers_.isEmpty()) {
peers_ = other.peers_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensurePeersIsMutable();
peers_.addAll(other.peers_);
}
onChanged();
}
} else {
if (!other.peers_.isEmpty()) {
if (peersBuilder_.isEmpty()) {
peersBuilder_.dispose();
peersBuilder_ = null;
peers_ = other.peers_;
bitField0_ = (bitField0_ & ~0x00000010);
peersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPeersFieldBuilder() : null;
} else {
peersBuilder_.addAllMessages(other.peers_);
}
}
}
if (other.hasEncryptionMeta()) {
mergeEncryptionMeta(other.getEncryptionMeta());
}
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 {
org.tikv.kvproto.Metapb.Region parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.Metapb.Region) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long id_ ;
/**
* uint64 id = 1;
*/
public long getId() {
return id_;
}
/**
* uint64 id = 1;
*/
public Builder setId(long value) {
id_ = value;
onChanged();
return this;
}
/**
* uint64 id = 1;
*/
public Builder clearId() {
id_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.ByteString startKey_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Region key range [start_key, end_key).
*
*
* bytes start_key = 2;
*/
public com.google.protobuf.ByteString getStartKey() {
return startKey_;
}
/**
*
* Region key range [start_key, end_key).
*
*
* bytes start_key = 2;
*/
public Builder setStartKey(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
startKey_ = value;
onChanged();
return this;
}
/**
*
* Region key range [start_key, end_key).
*
*
* bytes start_key = 2;
*/
public Builder clearStartKey() {
startKey_ = getDefaultInstance().getStartKey();
onChanged();
return this;
}
private com.google.protobuf.ByteString endKey_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes end_key = 3;
*/
public com.google.protobuf.ByteString getEndKey() {
return endKey_;
}
/**
* bytes end_key = 3;
*/
public Builder setEndKey(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
endKey_ = value;
onChanged();
return this;
}
/**
* bytes end_key = 3;
*/
public Builder clearEndKey() {
endKey_ = getDefaultInstance().getEndKey();
onChanged();
return this;
}
private org.tikv.kvproto.Metapb.RegionEpoch regionEpoch_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Metapb.RegionEpoch, org.tikv.kvproto.Metapb.RegionEpoch.Builder, org.tikv.kvproto.Metapb.RegionEpochOrBuilder> regionEpochBuilder_;
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
public boolean hasRegionEpoch() {
return regionEpochBuilder_ != null || regionEpoch_ != null;
}
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
public org.tikv.kvproto.Metapb.RegionEpoch getRegionEpoch() {
if (regionEpochBuilder_ == null) {
return regionEpoch_ == null ? org.tikv.kvproto.Metapb.RegionEpoch.getDefaultInstance() : regionEpoch_;
} else {
return regionEpochBuilder_.getMessage();
}
}
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
public Builder setRegionEpoch(org.tikv.kvproto.Metapb.RegionEpoch value) {
if (regionEpochBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
regionEpoch_ = value;
onChanged();
} else {
regionEpochBuilder_.setMessage(value);
}
return this;
}
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
public Builder setRegionEpoch(
org.tikv.kvproto.Metapb.RegionEpoch.Builder builderForValue) {
if (regionEpochBuilder_ == null) {
regionEpoch_ = builderForValue.build();
onChanged();
} else {
regionEpochBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
public Builder mergeRegionEpoch(org.tikv.kvproto.Metapb.RegionEpoch value) {
if (regionEpochBuilder_ == null) {
if (regionEpoch_ != null) {
regionEpoch_ =
org.tikv.kvproto.Metapb.RegionEpoch.newBuilder(regionEpoch_).mergeFrom(value).buildPartial();
} else {
regionEpoch_ = value;
}
onChanged();
} else {
regionEpochBuilder_.mergeFrom(value);
}
return this;
}
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
public Builder clearRegionEpoch() {
if (regionEpochBuilder_ == null) {
regionEpoch_ = null;
onChanged();
} else {
regionEpoch_ = null;
regionEpochBuilder_ = null;
}
return this;
}
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
public org.tikv.kvproto.Metapb.RegionEpoch.Builder getRegionEpochBuilder() {
onChanged();
return getRegionEpochFieldBuilder().getBuilder();
}
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
public org.tikv.kvproto.Metapb.RegionEpochOrBuilder getRegionEpochOrBuilder() {
if (regionEpochBuilder_ != null) {
return regionEpochBuilder_.getMessageOrBuilder();
} else {
return regionEpoch_ == null ?
org.tikv.kvproto.Metapb.RegionEpoch.getDefaultInstance() : regionEpoch_;
}
}
/**
* .metapb.RegionEpoch region_epoch = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Metapb.RegionEpoch, org.tikv.kvproto.Metapb.RegionEpoch.Builder, org.tikv.kvproto.Metapb.RegionEpochOrBuilder>
getRegionEpochFieldBuilder() {
if (regionEpochBuilder_ == null) {
regionEpochBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Metapb.RegionEpoch, org.tikv.kvproto.Metapb.RegionEpoch.Builder, org.tikv.kvproto.Metapb.RegionEpochOrBuilder>(
getRegionEpoch(),
getParentForChildren(),
isClean());
regionEpoch_ = null;
}
return regionEpochBuilder_;
}
private java.util.List peers_ =
java.util.Collections.emptyList();
private void ensurePeersIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
peers_ = new java.util.ArrayList(peers_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tikv.kvproto.Metapb.Peer, org.tikv.kvproto.Metapb.Peer.Builder, org.tikv.kvproto.Metapb.PeerOrBuilder> peersBuilder_;
/**
* repeated .metapb.Peer peers = 5;
*/
public java.util.List getPeersList() {
if (peersBuilder_ == null) {
return java.util.Collections.unmodifiableList(peers_);
} else {
return peersBuilder_.getMessageList();
}
}
/**
* repeated .metapb.Peer peers = 5;
*/
public int getPeersCount() {
if (peersBuilder_ == null) {
return peers_.size();
} else {
return peersBuilder_.getCount();
}
}
/**
* repeated .metapb.Peer peers = 5;
*/
public org.tikv.kvproto.Metapb.Peer getPeers(int index) {
if (peersBuilder_ == null) {
return peers_.get(index);
} else {
return peersBuilder_.getMessage(index);
}
}
/**
* repeated .metapb.Peer peers = 5;
*/
public Builder setPeers(
int index, org.tikv.kvproto.Metapb.Peer value) {
if (peersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePeersIsMutable();
peers_.set(index, value);
onChanged();
} else {
peersBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .metapb.Peer peers = 5;
*/
public Builder setPeers(
int index, org.tikv.kvproto.Metapb.Peer.Builder builderForValue) {
if (peersBuilder_ == null) {
ensurePeersIsMutable();
peers_.set(index, builderForValue.build());
onChanged();
} else {
peersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .metapb.Peer peers = 5;
*/
public Builder addPeers(org.tikv.kvproto.Metapb.Peer value) {
if (peersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePeersIsMutable();
peers_.add(value);
onChanged();
} else {
peersBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .metapb.Peer peers = 5;
*/
public Builder addPeers(
int index, org.tikv.kvproto.Metapb.Peer value) {
if (peersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePeersIsMutable();
peers_.add(index, value);
onChanged();
} else {
peersBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .metapb.Peer peers = 5;
*/
public Builder addPeers(
org.tikv.kvproto.Metapb.Peer.Builder builderForValue) {
if (peersBuilder_ == null) {
ensurePeersIsMutable();
peers_.add(builderForValue.build());
onChanged();
} else {
peersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .metapb.Peer peers = 5;
*/
public Builder addPeers(
int index, org.tikv.kvproto.Metapb.Peer.Builder builderForValue) {
if (peersBuilder_ == null) {
ensurePeersIsMutable();
peers_.add(index, builderForValue.build());
onChanged();
} else {
peersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .metapb.Peer peers = 5;
*/
public Builder addAllPeers(
java.lang.Iterable extends org.tikv.kvproto.Metapb.Peer> values) {
if (peersBuilder_ == null) {
ensurePeersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, peers_);
onChanged();
} else {
peersBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .metapb.Peer peers = 5;
*/
public Builder clearPeers() {
if (peersBuilder_ == null) {
peers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
peersBuilder_.clear();
}
return this;
}
/**
* repeated .metapb.Peer peers = 5;
*/
public Builder removePeers(int index) {
if (peersBuilder_ == null) {
ensurePeersIsMutable();
peers_.remove(index);
onChanged();
} else {
peersBuilder_.remove(index);
}
return this;
}
/**
* repeated .metapb.Peer peers = 5;
*/
public org.tikv.kvproto.Metapb.Peer.Builder getPeersBuilder(
int index) {
return getPeersFieldBuilder().getBuilder(index);
}
/**
* repeated .metapb.Peer peers = 5;
*/
public org.tikv.kvproto.Metapb.PeerOrBuilder getPeersOrBuilder(
int index) {
if (peersBuilder_ == null) {
return peers_.get(index); } else {
return peersBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .metapb.Peer peers = 5;
*/
public java.util.List extends org.tikv.kvproto.Metapb.PeerOrBuilder>
getPeersOrBuilderList() {
if (peersBuilder_ != null) {
return peersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(peers_);
}
}
/**
* repeated .metapb.Peer peers = 5;
*/
public org.tikv.kvproto.Metapb.Peer.Builder addPeersBuilder() {
return getPeersFieldBuilder().addBuilder(
org.tikv.kvproto.Metapb.Peer.getDefaultInstance());
}
/**
* repeated .metapb.Peer peers = 5;
*/
public org.tikv.kvproto.Metapb.Peer.Builder addPeersBuilder(
int index) {
return getPeersFieldBuilder().addBuilder(
index, org.tikv.kvproto.Metapb.Peer.getDefaultInstance());
}
/**
* repeated .metapb.Peer peers = 5;
*/
public java.util.List
getPeersBuilderList() {
return getPeersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tikv.kvproto.Metapb.Peer, org.tikv.kvproto.Metapb.Peer.Builder, org.tikv.kvproto.Metapb.PeerOrBuilder>
getPeersFieldBuilder() {
if (peersBuilder_ == null) {
peersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tikv.kvproto.Metapb.Peer, org.tikv.kvproto.Metapb.Peer.Builder, org.tikv.kvproto.Metapb.PeerOrBuilder>(
peers_,
((bitField0_ & 0x00000010) == 0x00000010),
getParentForChildren(),
isClean());
peers_ = null;
}
return peersBuilder_;
}
private org.tikv.kvproto.Encryptionpb.EncryptionMeta encryptionMeta_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Encryptionpb.EncryptionMeta, org.tikv.kvproto.Encryptionpb.EncryptionMeta.Builder, org.tikv.kvproto.Encryptionpb.EncryptionMetaOrBuilder> encryptionMetaBuilder_;
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
public boolean hasEncryptionMeta() {
return encryptionMetaBuilder_ != null || encryptionMeta_ != null;
}
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
public org.tikv.kvproto.Encryptionpb.EncryptionMeta getEncryptionMeta() {
if (encryptionMetaBuilder_ == null) {
return encryptionMeta_ == null ? org.tikv.kvproto.Encryptionpb.EncryptionMeta.getDefaultInstance() : encryptionMeta_;
} else {
return encryptionMetaBuilder_.getMessage();
}
}
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
public Builder setEncryptionMeta(org.tikv.kvproto.Encryptionpb.EncryptionMeta value) {
if (encryptionMetaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
encryptionMeta_ = value;
onChanged();
} else {
encryptionMetaBuilder_.setMessage(value);
}
return this;
}
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
public Builder setEncryptionMeta(
org.tikv.kvproto.Encryptionpb.EncryptionMeta.Builder builderForValue) {
if (encryptionMetaBuilder_ == null) {
encryptionMeta_ = builderForValue.build();
onChanged();
} else {
encryptionMetaBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
public Builder mergeEncryptionMeta(org.tikv.kvproto.Encryptionpb.EncryptionMeta value) {
if (encryptionMetaBuilder_ == null) {
if (encryptionMeta_ != null) {
encryptionMeta_ =
org.tikv.kvproto.Encryptionpb.EncryptionMeta.newBuilder(encryptionMeta_).mergeFrom(value).buildPartial();
} else {
encryptionMeta_ = value;
}
onChanged();
} else {
encryptionMetaBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
public Builder clearEncryptionMeta() {
if (encryptionMetaBuilder_ == null) {
encryptionMeta_ = null;
onChanged();
} else {
encryptionMeta_ = null;
encryptionMetaBuilder_ = null;
}
return this;
}
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
public org.tikv.kvproto.Encryptionpb.EncryptionMeta.Builder getEncryptionMetaBuilder() {
onChanged();
return getEncryptionMetaFieldBuilder().getBuilder();
}
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
public org.tikv.kvproto.Encryptionpb.EncryptionMetaOrBuilder getEncryptionMetaOrBuilder() {
if (encryptionMetaBuilder_ != null) {
return encryptionMetaBuilder_.getMessageOrBuilder();
} else {
return encryptionMeta_ == null ?
org.tikv.kvproto.Encryptionpb.EncryptionMeta.getDefaultInstance() : encryptionMeta_;
}
}
/**
*
* Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
* IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
* The field is only used by PD and should be ignored otherwise.
* If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
*
*
* .encryptionpb.EncryptionMeta encryption_meta = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Encryptionpb.EncryptionMeta, org.tikv.kvproto.Encryptionpb.EncryptionMeta.Builder, org.tikv.kvproto.Encryptionpb.EncryptionMetaOrBuilder>
getEncryptionMetaFieldBuilder() {
if (encryptionMetaBuilder_ == null) {
encryptionMetaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Encryptionpb.EncryptionMeta, org.tikv.kvproto.Encryptionpb.EncryptionMeta.Builder, org.tikv.kvproto.Encryptionpb.EncryptionMetaOrBuilder>(
getEncryptionMeta(),
getParentForChildren(),
isClean());
encryptionMeta_ = null;
}
return encryptionMetaBuilder_;
}
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:metapb.Region)
}
// @@protoc_insertion_point(class_scope:metapb.Region)
private static final org.tikv.kvproto.Metapb.Region DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Metapb.Region();
}
public static org.tikv.kvproto.Metapb.Region getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Region parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Region(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tikv.kvproto.Metapb.Region getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PeerOrBuilder extends
// @@protoc_insertion_point(interface_extends:metapb.Peer)
com.google.protobuf.MessageOrBuilder {
/**
* uint64 id = 1;
*/
long getId();
/**
* uint64 store_id = 2;
*/
long getStoreId();
/**
* .metapb.PeerRole role = 3;
*/
int getRoleValue();
/**
* .metapb.PeerRole role = 3;
*/
org.tikv.kvproto.Metapb.PeerRole getRole();
}
/**
* Protobuf type {@code metapb.Peer}
*/
public static final class Peer extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:metapb.Peer)
PeerOrBuilder {
private static final long serialVersionUID = 0L;
// Use Peer.newBuilder() to construct.
private Peer(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Peer() {
id_ = 0L;
storeId_ = 0L;
role_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Peer(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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 16: {
storeId_ = input.readUInt64();
break;
}
case 24: {
int rawValue = input.readEnum();
role_ = rawValue;
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 org.tikv.kvproto.Metapb.internal_static_metapb_Peer_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Peer_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Metapb.Peer.class, org.tikv.kvproto.Metapb.Peer.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private long id_;
/**
* uint64 id = 1;
*/
public long getId() {
return id_;
}
public static final int STORE_ID_FIELD_NUMBER = 2;
private long storeId_;
/**
* uint64 store_id = 2;
*/
public long getStoreId() {
return storeId_;
}
public static final int ROLE_FIELD_NUMBER = 3;
private int role_;
/**
* .metapb.PeerRole role = 3;
*/
public int getRoleValue() {
return role_;
}
/**
* .metapb.PeerRole role = 3;
*/
public org.tikv.kvproto.Metapb.PeerRole getRole() {
org.tikv.kvproto.Metapb.PeerRole result = org.tikv.kvproto.Metapb.PeerRole.valueOf(role_);
return result == null ? org.tikv.kvproto.Metapb.PeerRole.UNRECOGNIZED : result;
}
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 (id_ != 0L) {
output.writeUInt64(1, id_);
}
if (storeId_ != 0L) {
output.writeUInt64(2, storeId_);
}
if (role_ != org.tikv.kvproto.Metapb.PeerRole.Voter.getNumber()) {
output.writeEnum(3, role_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, id_);
}
if (storeId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, storeId_);
}
if (role_ != org.tikv.kvproto.Metapb.PeerRole.Voter.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, role_);
}
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 org.tikv.kvproto.Metapb.Peer)) {
return super.equals(obj);
}
org.tikv.kvproto.Metapb.Peer other = (org.tikv.kvproto.Metapb.Peer) obj;
boolean result = true;
result = result && (getId()
== other.getId());
result = result && (getStoreId()
== other.getStoreId());
result = result && role_ == other.role_;
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) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
hash = (37 * hash) + STORE_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStoreId());
hash = (37 * hash) + ROLE_FIELD_NUMBER;
hash = (53 * hash) + role_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Metapb.Peer parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.Peer parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.Peer parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.Peer parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.Peer parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Metapb.Peer parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Metapb.Peer parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.Peer 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 org.tikv.kvproto.Metapb.Peer parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.Peer 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 org.tikv.kvproto.Metapb.Peer parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Metapb.Peer 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(org.tikv.kvproto.Metapb.Peer 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 metapb.Peer}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:metapb.Peer)
org.tikv.kvproto.Metapb.PeerOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Peer_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Peer_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Metapb.Peer.class, org.tikv.kvproto.Metapb.Peer.Builder.class);
}
// Construct using org.tikv.kvproto.Metapb.Peer.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();
id_ = 0L;
storeId_ = 0L;
role_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.Metapb.internal_static_metapb_Peer_descriptor;
}
public org.tikv.kvproto.Metapb.Peer getDefaultInstanceForType() {
return org.tikv.kvproto.Metapb.Peer.getDefaultInstance();
}
public org.tikv.kvproto.Metapb.Peer build() {
org.tikv.kvproto.Metapb.Peer result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.Metapb.Peer buildPartial() {
org.tikv.kvproto.Metapb.Peer result = new org.tikv.kvproto.Metapb.Peer(this);
result.id_ = id_;
result.storeId_ = storeId_;
result.role_ = role_;
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 org.tikv.kvproto.Metapb.Peer) {
return mergeFrom((org.tikv.kvproto.Metapb.Peer)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.Metapb.Peer other) {
if (other == org.tikv.kvproto.Metapb.Peer.getDefaultInstance()) return this;
if (other.getId() != 0L) {
setId(other.getId());
}
if (other.getStoreId() != 0L) {
setStoreId(other.getStoreId());
}
if (other.role_ != 0) {
setRoleValue(other.getRoleValue());
}
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 {
org.tikv.kvproto.Metapb.Peer parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.Metapb.Peer) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long id_ ;
/**
* uint64 id = 1;
*/
public long getId() {
return id_;
}
/**
* uint64 id = 1;
*/
public Builder setId(long value) {
id_ = value;
onChanged();
return this;
}
/**
* uint64 id = 1;
*/
public Builder clearId() {
id_ = 0L;
onChanged();
return this;
}
private long storeId_ ;
/**
* uint64 store_id = 2;
*/
public long getStoreId() {
return storeId_;
}
/**
* uint64 store_id = 2;
*/
public Builder setStoreId(long value) {
storeId_ = value;
onChanged();
return this;
}
/**
* uint64 store_id = 2;
*/
public Builder clearStoreId() {
storeId_ = 0L;
onChanged();
return this;
}
private int role_ = 0;
/**
* .metapb.PeerRole role = 3;
*/
public int getRoleValue() {
return role_;
}
/**
* .metapb.PeerRole role = 3;
*/
public Builder setRoleValue(int value) {
role_ = value;
onChanged();
return this;
}
/**
* .metapb.PeerRole role = 3;
*/
public org.tikv.kvproto.Metapb.PeerRole getRole() {
org.tikv.kvproto.Metapb.PeerRole result = org.tikv.kvproto.Metapb.PeerRole.valueOf(role_);
return result == null ? org.tikv.kvproto.Metapb.PeerRole.UNRECOGNIZED : result;
}
/**
* .metapb.PeerRole role = 3;
*/
public Builder setRole(org.tikv.kvproto.Metapb.PeerRole value) {
if (value == null) {
throw new NullPointerException();
}
role_ = value.getNumber();
onChanged();
return this;
}
/**
* .metapb.PeerRole role = 3;
*/
public Builder clearRole() {
role_ = 0;
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:metapb.Peer)
}
// @@protoc_insertion_point(class_scope:metapb.Peer)
private static final org.tikv.kvproto.Metapb.Peer DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Metapb.Peer();
}
public static org.tikv.kvproto.Metapb.Peer getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Peer parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Peer(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tikv.kvproto.Metapb.Peer getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_metapb_Cluster_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_metapb_Cluster_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_metapb_StoreLabel_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_metapb_StoreLabel_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_metapb_Store_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_metapb_Store_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_metapb_RegionEpoch_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_metapb_RegionEpoch_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_metapb_Region_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_metapb_Region_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_metapb_Peer_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_metapb_Peer_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\014metapb.proto\022\006metapb\032\022encryptionpb.pro" +
"to\032\024gogoproto/gogo.proto\032\017rustproto.prot" +
"o\"-\n\007Cluster\022\n\n\002id\030\001 \001(\004\022\026\n\016max_peer_cou" +
"nt\030\002 \001(\r\"(\n\nStoreLabel\022\013\n\003key\030\001 \001(\t\022\r\n\005v" +
"alue\030\002 \001(\t\"\240\002\n\005Store\022\n\n\002id\030\001 \001(\004\022\017\n\007addr" +
"ess\030\002 \001(\t\022!\n\005state\030\003 \001(\0162\022.metapb.StoreS" +
"tate\022\"\n\006labels\030\004 \003(\0132\022.metapb.StoreLabel" +
"\022\017\n\007version\030\005 \001(\t\022\024\n\014peer_address\030\006 \001(\t\022" +
"\026\n\016status_address\030\007 \001(\t\022\020\n\010git_hash\030\010 \001(" +
"\t\022\027\n\017start_timestamp\030\t \001(\003\022\023\n\013deploy_pat" +
"h\030\n \001(\t\022\026\n\016last_heartbeat\030\013 \001(\003\022\034\n\024physi" +
"cally_destroyed\030\014 \001(\010\"0\n\013RegionEpoch\022\020\n\010" +
"conf_ver\030\001 \001(\004\022\017\n\007version\030\002 \001(\004\"\267\001\n\006Regi" +
"on\022\n\n\002id\030\001 \001(\004\022\021\n\tstart_key\030\002 \001(\014\022\017\n\007end" +
"_key\030\003 \001(\014\022)\n\014region_epoch\030\004 \001(\0132\023.metap" +
"b.RegionEpoch\022\033\n\005peers\030\005 \003(\0132\014.metapb.Pe" +
"er\0225\n\017encryption_meta\030\006 \001(\0132\034.encryption" +
"pb.EncryptionMeta\"D\n\004Peer\022\n\n\002id\030\001 \001(\004\022\020\n" +
"\010store_id\030\002 \001(\004\022\036\n\004role\030\003 \001(\0162\020.metapb.P" +
"eerRole*0\n\nStoreState\022\006\n\002Up\020\000\022\013\n\007Offline" +
"\020\001\022\r\n\tTombstone\020\002*H\n\010PeerRole\022\t\n\005Voter\020\000" +
"\022\013\n\007Learner\020\001\022\021\n\rIncomingVoter\020\002\022\021\n\rDemo" +
"tingVoter\020\003B\"\n\020org.tikv.kvproto\310\342\036\001\340\342\036\001\320" +
"\342\036\001\330\250\010\001b\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
org.tikv.kvproto.Encryptionpb.getDescriptor(),
com.google.protobuf.GoGoProtos.getDescriptor(),
rustproto.Rustproto.getDescriptor(),
}, assigner);
internal_static_metapb_Cluster_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_metapb_Cluster_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_metapb_Cluster_descriptor,
new java.lang.String[] { "Id", "MaxPeerCount", });
internal_static_metapb_StoreLabel_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_metapb_StoreLabel_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_metapb_StoreLabel_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_metapb_Store_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_metapb_Store_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_metapb_Store_descriptor,
new java.lang.String[] { "Id", "Address", "State", "Labels", "Version", "PeerAddress", "StatusAddress", "GitHash", "StartTimestamp", "DeployPath", "LastHeartbeat", "PhysicallyDestroyed", });
internal_static_metapb_RegionEpoch_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_metapb_RegionEpoch_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_metapb_RegionEpoch_descriptor,
new java.lang.String[] { "ConfVer", "Version", });
internal_static_metapb_Region_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_metapb_Region_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_metapb_Region_descriptor,
new java.lang.String[] { "Id", "StartKey", "EndKey", "RegionEpoch", "Peers", "EncryptionMeta", });
internal_static_metapb_Peer_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_metapb_Peer_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_metapb_Peer_descriptor,
new java.lang.String[] { "Id", "StoreId", "Role", });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.protobuf.GoGoProtos.marshalerAll);
registry.add(com.google.protobuf.GoGoProtos.sizerAll);
registry.add(com.google.protobuf.GoGoProtos.unmarshalerAll);
registry.add(rustproto.Rustproto.liteRuntimeAll);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
org.tikv.kvproto.Encryptionpb.getDescriptor();
com.google.protobuf.GoGoProtos.getDescriptor();
rustproto.Rustproto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy