org.tikv.kvproto.RaftServerpb Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: raft_serverpb.proto
package org.tikv.kvproto;
public final class RaftServerpb {
private RaftServerpb() {}
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 raft_serverpb.PeerState}
*/
public enum PeerState
implements com.google.protobuf.ProtocolMessageEnum {
/**
* Normal = 0;
*/
Normal(0),
/**
* Applying = 1;
*/
Applying(1),
/**
* Tombstone = 2;
*/
Tombstone(2),
/**
* Merging = 3;
*/
Merging(3),
UNRECOGNIZED(-1),
;
/**
* Normal = 0;
*/
public static final int Normal_VALUE = 0;
/**
* Applying = 1;
*/
public static final int Applying_VALUE = 1;
/**
* Tombstone = 2;
*/
public static final int Tombstone_VALUE = 2;
/**
* Merging = 3;
*/
public static final int Merging_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 PeerState valueOf(int value) {
return forNumber(value);
}
public static PeerState forNumber(int value) {
switch (value) {
case 0: return Normal;
case 1: return Applying;
case 2: return Tombstone;
case 3: return Merging;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
PeerState> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public PeerState findValueByNumber(int number) {
return PeerState.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.RaftServerpb.getDescriptor().getEnumTypes().get(0);
}
private static final PeerState[] VALUES = values();
public static PeerState 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 PeerState(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:raft_serverpb.PeerState)
}
/**
* Protobuf enum {@code raft_serverpb.ExtraMessageType}
*/
public enum ExtraMessageType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* MsgRegionWakeUp = 0;
*/
MsgRegionWakeUp(0),
/**
* MsgWantRollbackMerge = 1;
*/
MsgWantRollbackMerge(1),
/**
* MsgCheckStalePeer = 2;
*/
MsgCheckStalePeer(2),
/**
* MsgCheckStalePeerResponse = 3;
*/
MsgCheckStalePeerResponse(3),
/**
*
* If leader is going to sleep, it will send requests to all its followers
* to make sure they all agree to sleep.
*
*
* MsgHibernateRequest = 4;
*/
MsgHibernateRequest(4),
/**
* MsgHibernateResponse = 5;
*/
MsgHibernateResponse(5),
UNRECOGNIZED(-1),
;
/**
* MsgRegionWakeUp = 0;
*/
public static final int MsgRegionWakeUp_VALUE = 0;
/**
* MsgWantRollbackMerge = 1;
*/
public static final int MsgWantRollbackMerge_VALUE = 1;
/**
* MsgCheckStalePeer = 2;
*/
public static final int MsgCheckStalePeer_VALUE = 2;
/**
* MsgCheckStalePeerResponse = 3;
*/
public static final int MsgCheckStalePeerResponse_VALUE = 3;
/**
*
* If leader is going to sleep, it will send requests to all its followers
* to make sure they all agree to sleep.
*
*
* MsgHibernateRequest = 4;
*/
public static final int MsgHibernateRequest_VALUE = 4;
/**
* MsgHibernateResponse = 5;
*/
public static final int MsgHibernateResponse_VALUE = 5;
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 ExtraMessageType valueOf(int value) {
return forNumber(value);
}
public static ExtraMessageType forNumber(int value) {
switch (value) {
case 0: return MsgRegionWakeUp;
case 1: return MsgWantRollbackMerge;
case 2: return MsgCheckStalePeer;
case 3: return MsgCheckStalePeerResponse;
case 4: return MsgHibernateRequest;
case 5: return MsgHibernateResponse;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ExtraMessageType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ExtraMessageType findValueByNumber(int number) {
return ExtraMessageType.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.RaftServerpb.getDescriptor().getEnumTypes().get(1);
}
private static final ExtraMessageType[] VALUES = values();
public static ExtraMessageType 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 ExtraMessageType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:raft_serverpb.ExtraMessageType)
}
public interface RaftMessageOrBuilder extends
// @@protoc_insertion_point(interface_extends:raft_serverpb.RaftMessage)
com.google.protobuf.MessageOrBuilder {
/**
* uint64 region_id = 1;
*/
long getRegionId();
/**
* .metapb.Peer from_peer = 2;
*/
boolean hasFromPeer();
/**
* .metapb.Peer from_peer = 2;
*/
org.tikv.kvproto.Metapb.Peer getFromPeer();
/**
* .metapb.Peer from_peer = 2;
*/
org.tikv.kvproto.Metapb.PeerOrBuilder getFromPeerOrBuilder();
/**
* .metapb.Peer to_peer = 3;
*/
boolean hasToPeer();
/**
* .metapb.Peer to_peer = 3;
*/
org.tikv.kvproto.Metapb.Peer getToPeer();
/**
* .metapb.Peer to_peer = 3;
*/
org.tikv.kvproto.Metapb.PeerOrBuilder getToPeerOrBuilder();
/**
* .eraftpb.Message message = 4;
*/
boolean hasMessage();
/**
* .eraftpb.Message message = 4;
*/
eraftpb.Eraftpb.Message getMessage();
/**
* .eraftpb.Message message = 4;
*/
eraftpb.Eraftpb.MessageOrBuilder getMessageOrBuilder();
/**
* .metapb.RegionEpoch region_epoch = 5;
*/
boolean hasRegionEpoch();
/**
* .metapb.RegionEpoch region_epoch = 5;
*/
org.tikv.kvproto.Metapb.RegionEpoch getRegionEpoch();
/**
* .metapb.RegionEpoch region_epoch = 5;
*/
org.tikv.kvproto.Metapb.RegionEpochOrBuilder getRegionEpochOrBuilder();
/**
*
* true means to_peer is a tombstone peer and it should remove itself.
*
*
* bool is_tombstone = 6;
*/
boolean getIsTombstone();
/**
*
* Region key range [start_key, end_key).
*
*
* bytes start_key = 7;
*/
com.google.protobuf.ByteString getStartKey();
/**
* bytes end_key = 8;
*/
com.google.protobuf.ByteString getEndKey();
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
boolean hasMergeTarget();
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
org.tikv.kvproto.Metapb.Region getMergeTarget();
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
org.tikv.kvproto.Metapb.RegionOrBuilder getMergeTargetOrBuilder();
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
boolean hasExtraMsg();
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
org.tikv.kvproto.RaftServerpb.ExtraMessage getExtraMsg();
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
org.tikv.kvproto.RaftServerpb.ExtraMessageOrBuilder getExtraMsgOrBuilder();
}
/**
* Protobuf type {@code raft_serverpb.RaftMessage}
*/
public static final class RaftMessage extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:raft_serverpb.RaftMessage)
RaftMessageOrBuilder {
private static final long serialVersionUID = 0L;
// Use RaftMessage.newBuilder() to construct.
private RaftMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RaftMessage() {
regionId_ = 0L;
isTombstone_ = false;
startKey_ = com.google.protobuf.ByteString.EMPTY;
endKey_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RaftMessage(
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: {
regionId_ = input.readUInt64();
break;
}
case 18: {
org.tikv.kvproto.Metapb.Peer.Builder subBuilder = null;
if (fromPeer_ != null) {
subBuilder = fromPeer_.toBuilder();
}
fromPeer_ = input.readMessage(org.tikv.kvproto.Metapb.Peer.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(fromPeer_);
fromPeer_ = subBuilder.buildPartial();
}
break;
}
case 26: {
org.tikv.kvproto.Metapb.Peer.Builder subBuilder = null;
if (toPeer_ != null) {
subBuilder = toPeer_.toBuilder();
}
toPeer_ = input.readMessage(org.tikv.kvproto.Metapb.Peer.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(toPeer_);
toPeer_ = subBuilder.buildPartial();
}
break;
}
case 34: {
eraftpb.Eraftpb.Message.Builder subBuilder = null;
if (message_ != null) {
subBuilder = message_.toBuilder();
}
message_ = input.readMessage(eraftpb.Eraftpb.Message.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(message_);
message_ = subBuilder.buildPartial();
}
break;
}
case 42: {
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 48: {
isTombstone_ = input.readBool();
break;
}
case 58: {
startKey_ = input.readBytes();
break;
}
case 66: {
endKey_ = input.readBytes();
break;
}
case 74: {
org.tikv.kvproto.Metapb.Region.Builder subBuilder = null;
if (mergeTarget_ != null) {
subBuilder = mergeTarget_.toBuilder();
}
mergeTarget_ = input.readMessage(org.tikv.kvproto.Metapb.Region.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(mergeTarget_);
mergeTarget_ = subBuilder.buildPartial();
}
break;
}
case 82: {
org.tikv.kvproto.RaftServerpb.ExtraMessage.Builder subBuilder = null;
if (extraMsg_ != null) {
subBuilder = extraMsg_.toBuilder();
}
extraMsg_ = input.readMessage(org.tikv.kvproto.RaftServerpb.ExtraMessage.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(extraMsg_);
extraMsg_ = subBuilder.buildPartial();
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_RaftMessage_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_RaftMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.RaftServerpb.RaftMessage.class, org.tikv.kvproto.RaftServerpb.RaftMessage.Builder.class);
}
public static final int REGION_ID_FIELD_NUMBER = 1;
private long regionId_;
/**
* uint64 region_id = 1;
*/
public long getRegionId() {
return regionId_;
}
public static final int FROM_PEER_FIELD_NUMBER = 2;
private org.tikv.kvproto.Metapb.Peer fromPeer_;
/**
* .metapb.Peer from_peer = 2;
*/
public boolean hasFromPeer() {
return fromPeer_ != null;
}
/**
* .metapb.Peer from_peer = 2;
*/
public org.tikv.kvproto.Metapb.Peer getFromPeer() {
return fromPeer_ == null ? org.tikv.kvproto.Metapb.Peer.getDefaultInstance() : fromPeer_;
}
/**
* .metapb.Peer from_peer = 2;
*/
public org.tikv.kvproto.Metapb.PeerOrBuilder getFromPeerOrBuilder() {
return getFromPeer();
}
public static final int TO_PEER_FIELD_NUMBER = 3;
private org.tikv.kvproto.Metapb.Peer toPeer_;
/**
* .metapb.Peer to_peer = 3;
*/
public boolean hasToPeer() {
return toPeer_ != null;
}
/**
* .metapb.Peer to_peer = 3;
*/
public org.tikv.kvproto.Metapb.Peer getToPeer() {
return toPeer_ == null ? org.tikv.kvproto.Metapb.Peer.getDefaultInstance() : toPeer_;
}
/**
* .metapb.Peer to_peer = 3;
*/
public org.tikv.kvproto.Metapb.PeerOrBuilder getToPeerOrBuilder() {
return getToPeer();
}
public static final int MESSAGE_FIELD_NUMBER = 4;
private eraftpb.Eraftpb.Message message_;
/**
* .eraftpb.Message message = 4;
*/
public boolean hasMessage() {
return message_ != null;
}
/**
* .eraftpb.Message message = 4;
*/
public eraftpb.Eraftpb.Message getMessage() {
return message_ == null ? eraftpb.Eraftpb.Message.getDefaultInstance() : message_;
}
/**
* .eraftpb.Message message = 4;
*/
public eraftpb.Eraftpb.MessageOrBuilder getMessageOrBuilder() {
return getMessage();
}
public static final int REGION_EPOCH_FIELD_NUMBER = 5;
private org.tikv.kvproto.Metapb.RegionEpoch regionEpoch_;
/**
* .metapb.RegionEpoch region_epoch = 5;
*/
public boolean hasRegionEpoch() {
return regionEpoch_ != null;
}
/**
* .metapb.RegionEpoch region_epoch = 5;
*/
public org.tikv.kvproto.Metapb.RegionEpoch getRegionEpoch() {
return regionEpoch_ == null ? org.tikv.kvproto.Metapb.RegionEpoch.getDefaultInstance() : regionEpoch_;
}
/**
* .metapb.RegionEpoch region_epoch = 5;
*/
public org.tikv.kvproto.Metapb.RegionEpochOrBuilder getRegionEpochOrBuilder() {
return getRegionEpoch();
}
public static final int IS_TOMBSTONE_FIELD_NUMBER = 6;
private boolean isTombstone_;
/**
*
* true means to_peer is a tombstone peer and it should remove itself.
*
*
* bool is_tombstone = 6;
*/
public boolean getIsTombstone() {
return isTombstone_;
}
public static final int START_KEY_FIELD_NUMBER = 7;
private com.google.protobuf.ByteString startKey_;
/**
*
* Region key range [start_key, end_key).
*
*
* bytes start_key = 7;
*/
public com.google.protobuf.ByteString getStartKey() {
return startKey_;
}
public static final int END_KEY_FIELD_NUMBER = 8;
private com.google.protobuf.ByteString endKey_;
/**
* bytes end_key = 8;
*/
public com.google.protobuf.ByteString getEndKey() {
return endKey_;
}
public static final int MERGE_TARGET_FIELD_NUMBER = 9;
private org.tikv.kvproto.Metapb.Region mergeTarget_;
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
public boolean hasMergeTarget() {
return mergeTarget_ != null;
}
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
public org.tikv.kvproto.Metapb.Region getMergeTarget() {
return mergeTarget_ == null ? org.tikv.kvproto.Metapb.Region.getDefaultInstance() : mergeTarget_;
}
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
public org.tikv.kvproto.Metapb.RegionOrBuilder getMergeTargetOrBuilder() {
return getMergeTarget();
}
public static final int EXTRA_MSG_FIELD_NUMBER = 10;
private org.tikv.kvproto.RaftServerpb.ExtraMessage extraMsg_;
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
public boolean hasExtraMsg() {
return extraMsg_ != null;
}
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
public org.tikv.kvproto.RaftServerpb.ExtraMessage getExtraMsg() {
return extraMsg_ == null ? org.tikv.kvproto.RaftServerpb.ExtraMessage.getDefaultInstance() : extraMsg_;
}
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
public org.tikv.kvproto.RaftServerpb.ExtraMessageOrBuilder getExtraMsgOrBuilder() {
return getExtraMsg();
}
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 (regionId_ != 0L) {
output.writeUInt64(1, regionId_);
}
if (fromPeer_ != null) {
output.writeMessage(2, getFromPeer());
}
if (toPeer_ != null) {
output.writeMessage(3, getToPeer());
}
if (message_ != null) {
output.writeMessage(4, getMessage());
}
if (regionEpoch_ != null) {
output.writeMessage(5, getRegionEpoch());
}
if (isTombstone_ != false) {
output.writeBool(6, isTombstone_);
}
if (!startKey_.isEmpty()) {
output.writeBytes(7, startKey_);
}
if (!endKey_.isEmpty()) {
output.writeBytes(8, endKey_);
}
if (mergeTarget_ != null) {
output.writeMessage(9, getMergeTarget());
}
if (extraMsg_ != null) {
output.writeMessage(10, getExtraMsg());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (regionId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, regionId_);
}
if (fromPeer_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getFromPeer());
}
if (toPeer_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getToPeer());
}
if (message_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getMessage());
}
if (regionEpoch_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getRegionEpoch());
}
if (isTombstone_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, isTombstone_);
}
if (!startKey_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(7, startKey_);
}
if (!endKey_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(8, endKey_);
}
if (mergeTarget_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getMergeTarget());
}
if (extraMsg_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, getExtraMsg());
}
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.RaftServerpb.RaftMessage)) {
return super.equals(obj);
}
org.tikv.kvproto.RaftServerpb.RaftMessage other = (org.tikv.kvproto.RaftServerpb.RaftMessage) obj;
boolean result = true;
result = result && (getRegionId()
== other.getRegionId());
result = result && (hasFromPeer() == other.hasFromPeer());
if (hasFromPeer()) {
result = result && getFromPeer()
.equals(other.getFromPeer());
}
result = result && (hasToPeer() == other.hasToPeer());
if (hasToPeer()) {
result = result && getToPeer()
.equals(other.getToPeer());
}
result = result && (hasMessage() == other.hasMessage());
if (hasMessage()) {
result = result && getMessage()
.equals(other.getMessage());
}
result = result && (hasRegionEpoch() == other.hasRegionEpoch());
if (hasRegionEpoch()) {
result = result && getRegionEpoch()
.equals(other.getRegionEpoch());
}
result = result && (getIsTombstone()
== other.getIsTombstone());
result = result && getStartKey()
.equals(other.getStartKey());
result = result && getEndKey()
.equals(other.getEndKey());
result = result && (hasMergeTarget() == other.hasMergeTarget());
if (hasMergeTarget()) {
result = result && getMergeTarget()
.equals(other.getMergeTarget());
}
result = result && (hasExtraMsg() == other.hasExtraMsg());
if (hasExtraMsg()) {
result = result && getExtraMsg()
.equals(other.getExtraMsg());
}
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) + REGION_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRegionId());
if (hasFromPeer()) {
hash = (37 * hash) + FROM_PEER_FIELD_NUMBER;
hash = (53 * hash) + getFromPeer().hashCode();
}
if (hasToPeer()) {
hash = (37 * hash) + TO_PEER_FIELD_NUMBER;
hash = (53 * hash) + getToPeer().hashCode();
}
if (hasMessage()) {
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getMessage().hashCode();
}
if (hasRegionEpoch()) {
hash = (37 * hash) + REGION_EPOCH_FIELD_NUMBER;
hash = (53 * hash) + getRegionEpoch().hashCode();
}
hash = (37 * hash) + IS_TOMBSTONE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsTombstone());
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 (hasMergeTarget()) {
hash = (37 * hash) + MERGE_TARGET_FIELD_NUMBER;
hash = (53 * hash) + getMergeTarget().hashCode();
}
if (hasExtraMsg()) {
hash = (37 * hash) + EXTRA_MSG_FIELD_NUMBER;
hash = (53 * hash) + getExtraMsg().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.RaftServerpb.RaftMessage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.RaftMessage 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.RaftServerpb.RaftMessage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.RaftMessage 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.RaftServerpb.RaftMessage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.RaftMessage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.RaftServerpb.RaftMessage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.RaftMessage 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.RaftServerpb.RaftMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.RaftMessage 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.RaftServerpb.RaftMessage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.RaftMessage 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.RaftServerpb.RaftMessage 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 raft_serverpb.RaftMessage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:raft_serverpb.RaftMessage)
org.tikv.kvproto.RaftServerpb.RaftMessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_RaftMessage_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_RaftMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.RaftServerpb.RaftMessage.class, org.tikv.kvproto.RaftServerpb.RaftMessage.Builder.class);
}
// Construct using org.tikv.kvproto.RaftServerpb.RaftMessage.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();
regionId_ = 0L;
if (fromPeerBuilder_ == null) {
fromPeer_ = null;
} else {
fromPeer_ = null;
fromPeerBuilder_ = null;
}
if (toPeerBuilder_ == null) {
toPeer_ = null;
} else {
toPeer_ = null;
toPeerBuilder_ = null;
}
if (messageBuilder_ == null) {
message_ = null;
} else {
message_ = null;
messageBuilder_ = null;
}
if (regionEpochBuilder_ == null) {
regionEpoch_ = null;
} else {
regionEpoch_ = null;
regionEpochBuilder_ = null;
}
isTombstone_ = false;
startKey_ = com.google.protobuf.ByteString.EMPTY;
endKey_ = com.google.protobuf.ByteString.EMPTY;
if (mergeTargetBuilder_ == null) {
mergeTarget_ = null;
} else {
mergeTarget_ = null;
mergeTargetBuilder_ = null;
}
if (extraMsgBuilder_ == null) {
extraMsg_ = null;
} else {
extraMsg_ = null;
extraMsgBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_RaftMessage_descriptor;
}
public org.tikv.kvproto.RaftServerpb.RaftMessage getDefaultInstanceForType() {
return org.tikv.kvproto.RaftServerpb.RaftMessage.getDefaultInstance();
}
public org.tikv.kvproto.RaftServerpb.RaftMessage build() {
org.tikv.kvproto.RaftServerpb.RaftMessage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.RaftServerpb.RaftMessage buildPartial() {
org.tikv.kvproto.RaftServerpb.RaftMessage result = new org.tikv.kvproto.RaftServerpb.RaftMessage(this);
result.regionId_ = regionId_;
if (fromPeerBuilder_ == null) {
result.fromPeer_ = fromPeer_;
} else {
result.fromPeer_ = fromPeerBuilder_.build();
}
if (toPeerBuilder_ == null) {
result.toPeer_ = toPeer_;
} else {
result.toPeer_ = toPeerBuilder_.build();
}
if (messageBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = messageBuilder_.build();
}
if (regionEpochBuilder_ == null) {
result.regionEpoch_ = regionEpoch_;
} else {
result.regionEpoch_ = regionEpochBuilder_.build();
}
result.isTombstone_ = isTombstone_;
result.startKey_ = startKey_;
result.endKey_ = endKey_;
if (mergeTargetBuilder_ == null) {
result.mergeTarget_ = mergeTarget_;
} else {
result.mergeTarget_ = mergeTargetBuilder_.build();
}
if (extraMsgBuilder_ == null) {
result.extraMsg_ = extraMsg_;
} else {
result.extraMsg_ = extraMsgBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tikv.kvproto.RaftServerpb.RaftMessage) {
return mergeFrom((org.tikv.kvproto.RaftServerpb.RaftMessage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.RaftServerpb.RaftMessage other) {
if (other == org.tikv.kvproto.RaftServerpb.RaftMessage.getDefaultInstance()) return this;
if (other.getRegionId() != 0L) {
setRegionId(other.getRegionId());
}
if (other.hasFromPeer()) {
mergeFromPeer(other.getFromPeer());
}
if (other.hasToPeer()) {
mergeToPeer(other.getToPeer());
}
if (other.hasMessage()) {
mergeMessage(other.getMessage());
}
if (other.hasRegionEpoch()) {
mergeRegionEpoch(other.getRegionEpoch());
}
if (other.getIsTombstone() != false) {
setIsTombstone(other.getIsTombstone());
}
if (other.getStartKey() != com.google.protobuf.ByteString.EMPTY) {
setStartKey(other.getStartKey());
}
if (other.getEndKey() != com.google.protobuf.ByteString.EMPTY) {
setEndKey(other.getEndKey());
}
if (other.hasMergeTarget()) {
mergeMergeTarget(other.getMergeTarget());
}
if (other.hasExtraMsg()) {
mergeExtraMsg(other.getExtraMsg());
}
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.RaftServerpb.RaftMessage parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.RaftServerpb.RaftMessage) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long regionId_ ;
/**
* uint64 region_id = 1;
*/
public long getRegionId() {
return regionId_;
}
/**
* uint64 region_id = 1;
*/
public Builder setRegionId(long value) {
regionId_ = value;
onChanged();
return this;
}
/**
* uint64 region_id = 1;
*/
public Builder clearRegionId() {
regionId_ = 0L;
onChanged();
return this;
}
private org.tikv.kvproto.Metapb.Peer fromPeer_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Metapb.Peer, org.tikv.kvproto.Metapb.Peer.Builder, org.tikv.kvproto.Metapb.PeerOrBuilder> fromPeerBuilder_;
/**
* .metapb.Peer from_peer = 2;
*/
public boolean hasFromPeer() {
return fromPeerBuilder_ != null || fromPeer_ != null;
}
/**
* .metapb.Peer from_peer = 2;
*/
public org.tikv.kvproto.Metapb.Peer getFromPeer() {
if (fromPeerBuilder_ == null) {
return fromPeer_ == null ? org.tikv.kvproto.Metapb.Peer.getDefaultInstance() : fromPeer_;
} else {
return fromPeerBuilder_.getMessage();
}
}
/**
* .metapb.Peer from_peer = 2;
*/
public Builder setFromPeer(org.tikv.kvproto.Metapb.Peer value) {
if (fromPeerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fromPeer_ = value;
onChanged();
} else {
fromPeerBuilder_.setMessage(value);
}
return this;
}
/**
* .metapb.Peer from_peer = 2;
*/
public Builder setFromPeer(
org.tikv.kvproto.Metapb.Peer.Builder builderForValue) {
if (fromPeerBuilder_ == null) {
fromPeer_ = builderForValue.build();
onChanged();
} else {
fromPeerBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .metapb.Peer from_peer = 2;
*/
public Builder mergeFromPeer(org.tikv.kvproto.Metapb.Peer value) {
if (fromPeerBuilder_ == null) {
if (fromPeer_ != null) {
fromPeer_ =
org.tikv.kvproto.Metapb.Peer.newBuilder(fromPeer_).mergeFrom(value).buildPartial();
} else {
fromPeer_ = value;
}
onChanged();
} else {
fromPeerBuilder_.mergeFrom(value);
}
return this;
}
/**
* .metapb.Peer from_peer = 2;
*/
public Builder clearFromPeer() {
if (fromPeerBuilder_ == null) {
fromPeer_ = null;
onChanged();
} else {
fromPeer_ = null;
fromPeerBuilder_ = null;
}
return this;
}
/**
* .metapb.Peer from_peer = 2;
*/
public org.tikv.kvproto.Metapb.Peer.Builder getFromPeerBuilder() {
onChanged();
return getFromPeerFieldBuilder().getBuilder();
}
/**
* .metapb.Peer from_peer = 2;
*/
public org.tikv.kvproto.Metapb.PeerOrBuilder getFromPeerOrBuilder() {
if (fromPeerBuilder_ != null) {
return fromPeerBuilder_.getMessageOrBuilder();
} else {
return fromPeer_ == null ?
org.tikv.kvproto.Metapb.Peer.getDefaultInstance() : fromPeer_;
}
}
/**
* .metapb.Peer from_peer = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Metapb.Peer, org.tikv.kvproto.Metapb.Peer.Builder, org.tikv.kvproto.Metapb.PeerOrBuilder>
getFromPeerFieldBuilder() {
if (fromPeerBuilder_ == null) {
fromPeerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Metapb.Peer, org.tikv.kvproto.Metapb.Peer.Builder, org.tikv.kvproto.Metapb.PeerOrBuilder>(
getFromPeer(),
getParentForChildren(),
isClean());
fromPeer_ = null;
}
return fromPeerBuilder_;
}
private org.tikv.kvproto.Metapb.Peer toPeer_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Metapb.Peer, org.tikv.kvproto.Metapb.Peer.Builder, org.tikv.kvproto.Metapb.PeerOrBuilder> toPeerBuilder_;
/**
* .metapb.Peer to_peer = 3;
*/
public boolean hasToPeer() {
return toPeerBuilder_ != null || toPeer_ != null;
}
/**
* .metapb.Peer to_peer = 3;
*/
public org.tikv.kvproto.Metapb.Peer getToPeer() {
if (toPeerBuilder_ == null) {
return toPeer_ == null ? org.tikv.kvproto.Metapb.Peer.getDefaultInstance() : toPeer_;
} else {
return toPeerBuilder_.getMessage();
}
}
/**
* .metapb.Peer to_peer = 3;
*/
public Builder setToPeer(org.tikv.kvproto.Metapb.Peer value) {
if (toPeerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
toPeer_ = value;
onChanged();
} else {
toPeerBuilder_.setMessage(value);
}
return this;
}
/**
* .metapb.Peer to_peer = 3;
*/
public Builder setToPeer(
org.tikv.kvproto.Metapb.Peer.Builder builderForValue) {
if (toPeerBuilder_ == null) {
toPeer_ = builderForValue.build();
onChanged();
} else {
toPeerBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .metapb.Peer to_peer = 3;
*/
public Builder mergeToPeer(org.tikv.kvproto.Metapb.Peer value) {
if (toPeerBuilder_ == null) {
if (toPeer_ != null) {
toPeer_ =
org.tikv.kvproto.Metapb.Peer.newBuilder(toPeer_).mergeFrom(value).buildPartial();
} else {
toPeer_ = value;
}
onChanged();
} else {
toPeerBuilder_.mergeFrom(value);
}
return this;
}
/**
* .metapb.Peer to_peer = 3;
*/
public Builder clearToPeer() {
if (toPeerBuilder_ == null) {
toPeer_ = null;
onChanged();
} else {
toPeer_ = null;
toPeerBuilder_ = null;
}
return this;
}
/**
* .metapb.Peer to_peer = 3;
*/
public org.tikv.kvproto.Metapb.Peer.Builder getToPeerBuilder() {
onChanged();
return getToPeerFieldBuilder().getBuilder();
}
/**
* .metapb.Peer to_peer = 3;
*/
public org.tikv.kvproto.Metapb.PeerOrBuilder getToPeerOrBuilder() {
if (toPeerBuilder_ != null) {
return toPeerBuilder_.getMessageOrBuilder();
} else {
return toPeer_ == null ?
org.tikv.kvproto.Metapb.Peer.getDefaultInstance() : toPeer_;
}
}
/**
* .metapb.Peer to_peer = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Metapb.Peer, org.tikv.kvproto.Metapb.Peer.Builder, org.tikv.kvproto.Metapb.PeerOrBuilder>
getToPeerFieldBuilder() {
if (toPeerBuilder_ == null) {
toPeerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Metapb.Peer, org.tikv.kvproto.Metapb.Peer.Builder, org.tikv.kvproto.Metapb.PeerOrBuilder>(
getToPeer(),
getParentForChildren(),
isClean());
toPeer_ = null;
}
return toPeerBuilder_;
}
private eraftpb.Eraftpb.Message message_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
eraftpb.Eraftpb.Message, eraftpb.Eraftpb.Message.Builder, eraftpb.Eraftpb.MessageOrBuilder> messageBuilder_;
/**
* .eraftpb.Message message = 4;
*/
public boolean hasMessage() {
return messageBuilder_ != null || message_ != null;
}
/**
* .eraftpb.Message message = 4;
*/
public eraftpb.Eraftpb.Message getMessage() {
if (messageBuilder_ == null) {
return message_ == null ? eraftpb.Eraftpb.Message.getDefaultInstance() : message_;
} else {
return messageBuilder_.getMessage();
}
}
/**
* .eraftpb.Message message = 4;
*/
public Builder setMessage(eraftpb.Eraftpb.Message value) {
if (messageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
messageBuilder_.setMessage(value);
}
return this;
}
/**
* .eraftpb.Message message = 4;
*/
public Builder setMessage(
eraftpb.Eraftpb.Message.Builder builderForValue) {
if (messageBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
messageBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .eraftpb.Message message = 4;
*/
public Builder mergeMessage(eraftpb.Eraftpb.Message value) {
if (messageBuilder_ == null) {
if (message_ != null) {
message_ =
eraftpb.Eraftpb.Message.newBuilder(message_).mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
messageBuilder_.mergeFrom(value);
}
return this;
}
/**
* .eraftpb.Message message = 4;
*/
public Builder clearMessage() {
if (messageBuilder_ == null) {
message_ = null;
onChanged();
} else {
message_ = null;
messageBuilder_ = null;
}
return this;
}
/**
* .eraftpb.Message message = 4;
*/
public eraftpb.Eraftpb.Message.Builder getMessageBuilder() {
onChanged();
return getMessageFieldBuilder().getBuilder();
}
/**
* .eraftpb.Message message = 4;
*/
public eraftpb.Eraftpb.MessageOrBuilder getMessageOrBuilder() {
if (messageBuilder_ != null) {
return messageBuilder_.getMessageOrBuilder();
} else {
return message_ == null ?
eraftpb.Eraftpb.Message.getDefaultInstance() : message_;
}
}
/**
* .eraftpb.Message message = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
eraftpb.Eraftpb.Message, eraftpb.Eraftpb.Message.Builder, eraftpb.Eraftpb.MessageOrBuilder>
getMessageFieldBuilder() {
if (messageBuilder_ == null) {
messageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
eraftpb.Eraftpb.Message, eraftpb.Eraftpb.Message.Builder, eraftpb.Eraftpb.MessageOrBuilder>(
getMessage(),
getParentForChildren(),
isClean());
message_ = null;
}
return messageBuilder_;
}
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 = 5;
*/
public boolean hasRegionEpoch() {
return regionEpochBuilder_ != null || regionEpoch_ != null;
}
/**
* .metapb.RegionEpoch region_epoch = 5;
*/
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 = 5;
*/
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 = 5;
*/
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 = 5;
*/
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 = 5;
*/
public Builder clearRegionEpoch() {
if (regionEpochBuilder_ == null) {
regionEpoch_ = null;
onChanged();
} else {
regionEpoch_ = null;
regionEpochBuilder_ = null;
}
return this;
}
/**
* .metapb.RegionEpoch region_epoch = 5;
*/
public org.tikv.kvproto.Metapb.RegionEpoch.Builder getRegionEpochBuilder() {
onChanged();
return getRegionEpochFieldBuilder().getBuilder();
}
/**
* .metapb.RegionEpoch region_epoch = 5;
*/
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 = 5;
*/
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 boolean isTombstone_ ;
/**
*
* true means to_peer is a tombstone peer and it should remove itself.
*
*
* bool is_tombstone = 6;
*/
public boolean getIsTombstone() {
return isTombstone_;
}
/**
*
* true means to_peer is a tombstone peer and it should remove itself.
*
*
* bool is_tombstone = 6;
*/
public Builder setIsTombstone(boolean value) {
isTombstone_ = value;
onChanged();
return this;
}
/**
*
* true means to_peer is a tombstone peer and it should remove itself.
*
*
* bool is_tombstone = 6;
*/
public Builder clearIsTombstone() {
isTombstone_ = false;
onChanged();
return this;
}
private com.google.protobuf.ByteString startKey_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Region key range [start_key, end_key).
*
*
* bytes start_key = 7;
*/
public com.google.protobuf.ByteString getStartKey() {
return startKey_;
}
/**
*
* Region key range [start_key, end_key).
*
*
* bytes start_key = 7;
*/
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 = 7;
*/
public Builder clearStartKey() {
startKey_ = getDefaultInstance().getStartKey();
onChanged();
return this;
}
private com.google.protobuf.ByteString endKey_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes end_key = 8;
*/
public com.google.protobuf.ByteString getEndKey() {
return endKey_;
}
/**
* bytes end_key = 8;
*/
public Builder setEndKey(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
endKey_ = value;
onChanged();
return this;
}
/**
* bytes end_key = 8;
*/
public Builder clearEndKey() {
endKey_ = getDefaultInstance().getEndKey();
onChanged();
return this;
}
private org.tikv.kvproto.Metapb.Region mergeTarget_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Metapb.Region, org.tikv.kvproto.Metapb.Region.Builder, org.tikv.kvproto.Metapb.RegionOrBuilder> mergeTargetBuilder_;
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
public boolean hasMergeTarget() {
return mergeTargetBuilder_ != null || mergeTarget_ != null;
}
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
public org.tikv.kvproto.Metapb.Region getMergeTarget() {
if (mergeTargetBuilder_ == null) {
return mergeTarget_ == null ? org.tikv.kvproto.Metapb.Region.getDefaultInstance() : mergeTarget_;
} else {
return mergeTargetBuilder_.getMessage();
}
}
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
public Builder setMergeTarget(org.tikv.kvproto.Metapb.Region value) {
if (mergeTargetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
mergeTarget_ = value;
onChanged();
} else {
mergeTargetBuilder_.setMessage(value);
}
return this;
}
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
public Builder setMergeTarget(
org.tikv.kvproto.Metapb.Region.Builder builderForValue) {
if (mergeTargetBuilder_ == null) {
mergeTarget_ = builderForValue.build();
onChanged();
} else {
mergeTargetBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
public Builder mergeMergeTarget(org.tikv.kvproto.Metapb.Region value) {
if (mergeTargetBuilder_ == null) {
if (mergeTarget_ != null) {
mergeTarget_ =
org.tikv.kvproto.Metapb.Region.newBuilder(mergeTarget_).mergeFrom(value).buildPartial();
} else {
mergeTarget_ = value;
}
onChanged();
} else {
mergeTargetBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
public Builder clearMergeTarget() {
if (mergeTargetBuilder_ == null) {
mergeTarget_ = null;
onChanged();
} else {
mergeTarget_ = null;
mergeTargetBuilder_ = null;
}
return this;
}
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
public org.tikv.kvproto.Metapb.Region.Builder getMergeTargetBuilder() {
onChanged();
return getMergeTargetFieldBuilder().getBuilder();
}
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
public org.tikv.kvproto.Metapb.RegionOrBuilder getMergeTargetOrBuilder() {
if (mergeTargetBuilder_ != null) {
return mergeTargetBuilder_.getMessageOrBuilder();
} else {
return mergeTarget_ == null ?
org.tikv.kvproto.Metapb.Region.getDefaultInstance() : mergeTarget_;
}
}
/**
*
* If it has value, to_peer should be removed if merge is never going to complete.
*
*
* .metapb.Region merge_target = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Metapb.Region, org.tikv.kvproto.Metapb.Region.Builder, org.tikv.kvproto.Metapb.RegionOrBuilder>
getMergeTargetFieldBuilder() {
if (mergeTargetBuilder_ == null) {
mergeTargetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Metapb.Region, org.tikv.kvproto.Metapb.Region.Builder, org.tikv.kvproto.Metapb.RegionOrBuilder>(
getMergeTarget(),
getParentForChildren(),
isClean());
mergeTarget_ = null;
}
return mergeTargetBuilder_;
}
private org.tikv.kvproto.RaftServerpb.ExtraMessage extraMsg_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.RaftServerpb.ExtraMessage, org.tikv.kvproto.RaftServerpb.ExtraMessage.Builder, org.tikv.kvproto.RaftServerpb.ExtraMessageOrBuilder> extraMsgBuilder_;
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
public boolean hasExtraMsg() {
return extraMsgBuilder_ != null || extraMsg_ != null;
}
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
public org.tikv.kvproto.RaftServerpb.ExtraMessage getExtraMsg() {
if (extraMsgBuilder_ == null) {
return extraMsg_ == null ? org.tikv.kvproto.RaftServerpb.ExtraMessage.getDefaultInstance() : extraMsg_;
} else {
return extraMsgBuilder_.getMessage();
}
}
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
public Builder setExtraMsg(org.tikv.kvproto.RaftServerpb.ExtraMessage value) {
if (extraMsgBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
extraMsg_ = value;
onChanged();
} else {
extraMsgBuilder_.setMessage(value);
}
return this;
}
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
public Builder setExtraMsg(
org.tikv.kvproto.RaftServerpb.ExtraMessage.Builder builderForValue) {
if (extraMsgBuilder_ == null) {
extraMsg_ = builderForValue.build();
onChanged();
} else {
extraMsgBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
public Builder mergeExtraMsg(org.tikv.kvproto.RaftServerpb.ExtraMessage value) {
if (extraMsgBuilder_ == null) {
if (extraMsg_ != null) {
extraMsg_ =
org.tikv.kvproto.RaftServerpb.ExtraMessage.newBuilder(extraMsg_).mergeFrom(value).buildPartial();
} else {
extraMsg_ = value;
}
onChanged();
} else {
extraMsgBuilder_.mergeFrom(value);
}
return this;
}
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
public Builder clearExtraMsg() {
if (extraMsgBuilder_ == null) {
extraMsg_ = null;
onChanged();
} else {
extraMsg_ = null;
extraMsgBuilder_ = null;
}
return this;
}
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
public org.tikv.kvproto.RaftServerpb.ExtraMessage.Builder getExtraMsgBuilder() {
onChanged();
return getExtraMsgFieldBuilder().getBuilder();
}
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
public org.tikv.kvproto.RaftServerpb.ExtraMessageOrBuilder getExtraMsgOrBuilder() {
if (extraMsgBuilder_ != null) {
return extraMsgBuilder_.getMessageOrBuilder();
} else {
return extraMsg_ == null ?
org.tikv.kvproto.RaftServerpb.ExtraMessage.getDefaultInstance() : extraMsg_;
}
}
/**
* .raft_serverpb.ExtraMessage extra_msg = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.RaftServerpb.ExtraMessage, org.tikv.kvproto.RaftServerpb.ExtraMessage.Builder, org.tikv.kvproto.RaftServerpb.ExtraMessageOrBuilder>
getExtraMsgFieldBuilder() {
if (extraMsgBuilder_ == null) {
extraMsgBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.RaftServerpb.ExtraMessage, org.tikv.kvproto.RaftServerpb.ExtraMessage.Builder, org.tikv.kvproto.RaftServerpb.ExtraMessageOrBuilder>(
getExtraMsg(),
getParentForChildren(),
isClean());
extraMsg_ = null;
}
return extraMsgBuilder_;
}
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:raft_serverpb.RaftMessage)
}
// @@protoc_insertion_point(class_scope:raft_serverpb.RaftMessage)
private static final org.tikv.kvproto.RaftServerpb.RaftMessage DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.RaftServerpb.RaftMessage();
}
public static org.tikv.kvproto.RaftServerpb.RaftMessage getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public RaftMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RaftMessage(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.RaftServerpb.RaftMessage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RaftTruncatedStateOrBuilder extends
// @@protoc_insertion_point(interface_extends:raft_serverpb.RaftTruncatedState)
com.google.protobuf.MessageOrBuilder {
/**
* uint64 index = 1;
*/
long getIndex();
/**
* uint64 term = 2;
*/
long getTerm();
}
/**
* Protobuf type {@code raft_serverpb.RaftTruncatedState}
*/
public static final class RaftTruncatedState extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:raft_serverpb.RaftTruncatedState)
RaftTruncatedStateOrBuilder {
private static final long serialVersionUID = 0L;
// Use RaftTruncatedState.newBuilder() to construct.
private RaftTruncatedState(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RaftTruncatedState() {
index_ = 0L;
term_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RaftTruncatedState(
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: {
index_ = input.readUInt64();
break;
}
case 16: {
term_ = 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.RaftServerpb.internal_static_raft_serverpb_RaftTruncatedState_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_RaftTruncatedState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.RaftServerpb.RaftTruncatedState.class, org.tikv.kvproto.RaftServerpb.RaftTruncatedState.Builder.class);
}
public static final int INDEX_FIELD_NUMBER = 1;
private long index_;
/**
* uint64 index = 1;
*/
public long getIndex() {
return index_;
}
public static final int TERM_FIELD_NUMBER = 2;
private long term_;
/**
* uint64 term = 2;
*/
public long getTerm() {
return term_;
}
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 (index_ != 0L) {
output.writeUInt64(1, index_);
}
if (term_ != 0L) {
output.writeUInt64(2, term_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (index_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, index_);
}
if (term_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, term_);
}
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.RaftServerpb.RaftTruncatedState)) {
return super.equals(obj);
}
org.tikv.kvproto.RaftServerpb.RaftTruncatedState other = (org.tikv.kvproto.RaftServerpb.RaftTruncatedState) obj;
boolean result = true;
result = result && (getIndex()
== other.getIndex());
result = result && (getTerm()
== other.getTerm());
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) + INDEX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getIndex());
hash = (37 * hash) + TERM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTerm());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.RaftServerpb.RaftTruncatedState parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.RaftTruncatedState 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.RaftServerpb.RaftTruncatedState parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.RaftTruncatedState 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.RaftServerpb.RaftTruncatedState parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.RaftTruncatedState parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.RaftServerpb.RaftTruncatedState parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.RaftTruncatedState 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.RaftServerpb.RaftTruncatedState parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.RaftTruncatedState 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.RaftServerpb.RaftTruncatedState parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.RaftTruncatedState 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.RaftServerpb.RaftTruncatedState 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 raft_serverpb.RaftTruncatedState}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:raft_serverpb.RaftTruncatedState)
org.tikv.kvproto.RaftServerpb.RaftTruncatedStateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_RaftTruncatedState_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_RaftTruncatedState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.RaftServerpb.RaftTruncatedState.class, org.tikv.kvproto.RaftServerpb.RaftTruncatedState.Builder.class);
}
// Construct using org.tikv.kvproto.RaftServerpb.RaftTruncatedState.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();
index_ = 0L;
term_ = 0L;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_RaftTruncatedState_descriptor;
}
public org.tikv.kvproto.RaftServerpb.RaftTruncatedState getDefaultInstanceForType() {
return org.tikv.kvproto.RaftServerpb.RaftTruncatedState.getDefaultInstance();
}
public org.tikv.kvproto.RaftServerpb.RaftTruncatedState build() {
org.tikv.kvproto.RaftServerpb.RaftTruncatedState result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.RaftServerpb.RaftTruncatedState buildPartial() {
org.tikv.kvproto.RaftServerpb.RaftTruncatedState result = new org.tikv.kvproto.RaftServerpb.RaftTruncatedState(this);
result.index_ = index_;
result.term_ = term_;
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.RaftServerpb.RaftTruncatedState) {
return mergeFrom((org.tikv.kvproto.RaftServerpb.RaftTruncatedState)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.RaftServerpb.RaftTruncatedState other) {
if (other == org.tikv.kvproto.RaftServerpb.RaftTruncatedState.getDefaultInstance()) return this;
if (other.getIndex() != 0L) {
setIndex(other.getIndex());
}
if (other.getTerm() != 0L) {
setTerm(other.getTerm());
}
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.RaftServerpb.RaftTruncatedState parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.RaftServerpb.RaftTruncatedState) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long index_ ;
/**
* uint64 index = 1;
*/
public long getIndex() {
return index_;
}
/**
* uint64 index = 1;
*/
public Builder setIndex(long value) {
index_ = value;
onChanged();
return this;
}
/**
* uint64 index = 1;
*/
public Builder clearIndex() {
index_ = 0L;
onChanged();
return this;
}
private long term_ ;
/**
* uint64 term = 2;
*/
public long getTerm() {
return term_;
}
/**
* uint64 term = 2;
*/
public Builder setTerm(long value) {
term_ = value;
onChanged();
return this;
}
/**
* uint64 term = 2;
*/
public Builder clearTerm() {
term_ = 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:raft_serverpb.RaftTruncatedState)
}
// @@protoc_insertion_point(class_scope:raft_serverpb.RaftTruncatedState)
private static final org.tikv.kvproto.RaftServerpb.RaftTruncatedState DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.RaftServerpb.RaftTruncatedState();
}
public static org.tikv.kvproto.RaftServerpb.RaftTruncatedState getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public RaftTruncatedState parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RaftTruncatedState(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.RaftServerpb.RaftTruncatedState getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SnapshotCFFileOrBuilder extends
// @@protoc_insertion_point(interface_extends:raft_serverpb.SnapshotCFFile)
com.google.protobuf.MessageOrBuilder {
/**
* string cf = 1;
*/
java.lang.String getCf();
/**
* string cf = 1;
*/
com.google.protobuf.ByteString
getCfBytes();
/**
* uint64 size = 2;
*/
long getSize();
/**
* uint32 checksum = 3;
*/
int getChecksum();
}
/**
* Protobuf type {@code raft_serverpb.SnapshotCFFile}
*/
public static final class SnapshotCFFile extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:raft_serverpb.SnapshotCFFile)
SnapshotCFFileOrBuilder {
private static final long serialVersionUID = 0L;
// Use SnapshotCFFile.newBuilder() to construct.
private SnapshotCFFile(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SnapshotCFFile() {
cf_ = "";
size_ = 0L;
checksum_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SnapshotCFFile(
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();
cf_ = s;
break;
}
case 16: {
size_ = input.readUInt64();
break;
}
case 24: {
checksum_ = 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.RaftServerpb.internal_static_raft_serverpb_SnapshotCFFile_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotCFFile_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.RaftServerpb.SnapshotCFFile.class, org.tikv.kvproto.RaftServerpb.SnapshotCFFile.Builder.class);
}
public static final int CF_FIELD_NUMBER = 1;
private volatile java.lang.Object cf_;
/**
* string cf = 1;
*/
public java.lang.String getCf() {
java.lang.Object ref = cf_;
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();
cf_ = s;
return s;
}
}
/**
* string cf = 1;
*/
public com.google.protobuf.ByteString
getCfBytes() {
java.lang.Object ref = cf_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
cf_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SIZE_FIELD_NUMBER = 2;
private long size_;
/**
* uint64 size = 2;
*/
public long getSize() {
return size_;
}
public static final int CHECKSUM_FIELD_NUMBER = 3;
private int checksum_;
/**
* uint32 checksum = 3;
*/
public int getChecksum() {
return checksum_;
}
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 (!getCfBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cf_);
}
if (size_ != 0L) {
output.writeUInt64(2, size_);
}
if (checksum_ != 0) {
output.writeUInt32(3, checksum_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getCfBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cf_);
}
if (size_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, size_);
}
if (checksum_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, checksum_);
}
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.RaftServerpb.SnapshotCFFile)) {
return super.equals(obj);
}
org.tikv.kvproto.RaftServerpb.SnapshotCFFile other = (org.tikv.kvproto.RaftServerpb.SnapshotCFFile) obj;
boolean result = true;
result = result && getCf()
.equals(other.getCf());
result = result && (getSize()
== other.getSize());
result = result && (getChecksum()
== other.getChecksum());
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) + CF_FIELD_NUMBER;
hash = (53 * hash) + getCf().hashCode();
hash = (37 * hash) + SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSize());
hash = (37 * hash) + CHECKSUM_FIELD_NUMBER;
hash = (53 * hash) + getChecksum();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.RaftServerpb.SnapshotCFFile parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotCFFile 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.RaftServerpb.SnapshotCFFile parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotCFFile 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.RaftServerpb.SnapshotCFFile parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotCFFile parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotCFFile parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotCFFile 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.RaftServerpb.SnapshotCFFile parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotCFFile 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.RaftServerpb.SnapshotCFFile parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotCFFile 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.RaftServerpb.SnapshotCFFile 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 raft_serverpb.SnapshotCFFile}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:raft_serverpb.SnapshotCFFile)
org.tikv.kvproto.RaftServerpb.SnapshotCFFileOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotCFFile_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotCFFile_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.RaftServerpb.SnapshotCFFile.class, org.tikv.kvproto.RaftServerpb.SnapshotCFFile.Builder.class);
}
// Construct using org.tikv.kvproto.RaftServerpb.SnapshotCFFile.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();
cf_ = "";
size_ = 0L;
checksum_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotCFFile_descriptor;
}
public org.tikv.kvproto.RaftServerpb.SnapshotCFFile getDefaultInstanceForType() {
return org.tikv.kvproto.RaftServerpb.SnapshotCFFile.getDefaultInstance();
}
public org.tikv.kvproto.RaftServerpb.SnapshotCFFile build() {
org.tikv.kvproto.RaftServerpb.SnapshotCFFile result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.RaftServerpb.SnapshotCFFile buildPartial() {
org.tikv.kvproto.RaftServerpb.SnapshotCFFile result = new org.tikv.kvproto.RaftServerpb.SnapshotCFFile(this);
result.cf_ = cf_;
result.size_ = size_;
result.checksum_ = checksum_;
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.RaftServerpb.SnapshotCFFile) {
return mergeFrom((org.tikv.kvproto.RaftServerpb.SnapshotCFFile)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.RaftServerpb.SnapshotCFFile other) {
if (other == org.tikv.kvproto.RaftServerpb.SnapshotCFFile.getDefaultInstance()) return this;
if (!other.getCf().isEmpty()) {
cf_ = other.cf_;
onChanged();
}
if (other.getSize() != 0L) {
setSize(other.getSize());
}
if (other.getChecksum() != 0) {
setChecksum(other.getChecksum());
}
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.RaftServerpb.SnapshotCFFile parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.RaftServerpb.SnapshotCFFile) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object cf_ = "";
/**
* string cf = 1;
*/
public java.lang.String getCf() {
java.lang.Object ref = cf_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
cf_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string cf = 1;
*/
public com.google.protobuf.ByteString
getCfBytes() {
java.lang.Object ref = cf_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
cf_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string cf = 1;
*/
public Builder setCf(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
cf_ = value;
onChanged();
return this;
}
/**
* string cf = 1;
*/
public Builder clearCf() {
cf_ = getDefaultInstance().getCf();
onChanged();
return this;
}
/**
* string cf = 1;
*/
public Builder setCfBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
cf_ = value;
onChanged();
return this;
}
private long size_ ;
/**
* uint64 size = 2;
*/
public long getSize() {
return size_;
}
/**
* uint64 size = 2;
*/
public Builder setSize(long value) {
size_ = value;
onChanged();
return this;
}
/**
* uint64 size = 2;
*/
public Builder clearSize() {
size_ = 0L;
onChanged();
return this;
}
private int checksum_ ;
/**
* uint32 checksum = 3;
*/
public int getChecksum() {
return checksum_;
}
/**
* uint32 checksum = 3;
*/
public Builder setChecksum(int value) {
checksum_ = value;
onChanged();
return this;
}
/**
* uint32 checksum = 3;
*/
public Builder clearChecksum() {
checksum_ = 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:raft_serverpb.SnapshotCFFile)
}
// @@protoc_insertion_point(class_scope:raft_serverpb.SnapshotCFFile)
private static final org.tikv.kvproto.RaftServerpb.SnapshotCFFile DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.RaftServerpb.SnapshotCFFile();
}
public static org.tikv.kvproto.RaftServerpb.SnapshotCFFile getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public SnapshotCFFile parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SnapshotCFFile(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.RaftServerpb.SnapshotCFFile getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SnapshotMetaOrBuilder extends
// @@protoc_insertion_point(interface_extends:raft_serverpb.SnapshotMeta)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
java.util.List
getCfFilesList();
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
org.tikv.kvproto.RaftServerpb.SnapshotCFFile getCfFiles(int index);
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
int getCfFilesCount();
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
java.util.List extends org.tikv.kvproto.RaftServerpb.SnapshotCFFileOrBuilder>
getCfFilesOrBuilderList();
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
org.tikv.kvproto.RaftServerpb.SnapshotCFFileOrBuilder getCfFilesOrBuilder(
int index);
/**
*
* true means this snapshot is triggered for load balance
*
*
* bool for_balance = 2;
*/
boolean getForBalance();
}
/**
* Protobuf type {@code raft_serverpb.SnapshotMeta}
*/
public static final class SnapshotMeta extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:raft_serverpb.SnapshotMeta)
SnapshotMetaOrBuilder {
private static final long serialVersionUID = 0L;
// Use SnapshotMeta.newBuilder() to construct.
private SnapshotMeta(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SnapshotMeta() {
cfFiles_ = java.util.Collections.emptyList();
forBalance_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SnapshotMeta(
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: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
cfFiles_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
cfFiles_.add(
input.readMessage(org.tikv.kvproto.RaftServerpb.SnapshotCFFile.parser(), extensionRegistry));
break;
}
case 16: {
forBalance_ = 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_ & 0x00000001) == 0x00000001)) {
cfFiles_ = java.util.Collections.unmodifiableList(cfFiles_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotMeta_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotMeta_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.RaftServerpb.SnapshotMeta.class, org.tikv.kvproto.RaftServerpb.SnapshotMeta.Builder.class);
}
private int bitField0_;
public static final int CF_FILES_FIELD_NUMBER = 1;
private java.util.List cfFiles_;
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public java.util.List getCfFilesList() {
return cfFiles_;
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public java.util.List extends org.tikv.kvproto.RaftServerpb.SnapshotCFFileOrBuilder>
getCfFilesOrBuilderList() {
return cfFiles_;
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public int getCfFilesCount() {
return cfFiles_.size();
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public org.tikv.kvproto.RaftServerpb.SnapshotCFFile getCfFiles(int index) {
return cfFiles_.get(index);
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public org.tikv.kvproto.RaftServerpb.SnapshotCFFileOrBuilder getCfFilesOrBuilder(
int index) {
return cfFiles_.get(index);
}
public static final int FOR_BALANCE_FIELD_NUMBER = 2;
private boolean forBalance_;
/**
*
* true means this snapshot is triggered for load balance
*
*
* bool for_balance = 2;
*/
public boolean getForBalance() {
return forBalance_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < cfFiles_.size(); i++) {
output.writeMessage(1, cfFiles_.get(i));
}
if (forBalance_ != false) {
output.writeBool(2, forBalance_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < cfFiles_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, cfFiles_.get(i));
}
if (forBalance_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, forBalance_);
}
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.RaftServerpb.SnapshotMeta)) {
return super.equals(obj);
}
org.tikv.kvproto.RaftServerpb.SnapshotMeta other = (org.tikv.kvproto.RaftServerpb.SnapshotMeta) obj;
boolean result = true;
result = result && getCfFilesList()
.equals(other.getCfFilesList());
result = result && (getForBalance()
== other.getForBalance());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getCfFilesCount() > 0) {
hash = (37 * hash) + CF_FILES_FIELD_NUMBER;
hash = (53 * hash) + getCfFilesList().hashCode();
}
hash = (37 * hash) + FOR_BALANCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getForBalance());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.RaftServerpb.SnapshotMeta parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotMeta 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.RaftServerpb.SnapshotMeta parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotMeta 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.RaftServerpb.SnapshotMeta parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotMeta parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotMeta parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotMeta 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.RaftServerpb.SnapshotMeta parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotMeta 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.RaftServerpb.SnapshotMeta parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotMeta 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.RaftServerpb.SnapshotMeta 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 raft_serverpb.SnapshotMeta}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:raft_serverpb.SnapshotMeta)
org.tikv.kvproto.RaftServerpb.SnapshotMetaOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotMeta_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotMeta_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.RaftServerpb.SnapshotMeta.class, org.tikv.kvproto.RaftServerpb.SnapshotMeta.Builder.class);
}
// Construct using org.tikv.kvproto.RaftServerpb.SnapshotMeta.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getCfFilesFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (cfFilesBuilder_ == null) {
cfFiles_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
cfFilesBuilder_.clear();
}
forBalance_ = false;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotMeta_descriptor;
}
public org.tikv.kvproto.RaftServerpb.SnapshotMeta getDefaultInstanceForType() {
return org.tikv.kvproto.RaftServerpb.SnapshotMeta.getDefaultInstance();
}
public org.tikv.kvproto.RaftServerpb.SnapshotMeta build() {
org.tikv.kvproto.RaftServerpb.SnapshotMeta result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.RaftServerpb.SnapshotMeta buildPartial() {
org.tikv.kvproto.RaftServerpb.SnapshotMeta result = new org.tikv.kvproto.RaftServerpb.SnapshotMeta(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (cfFilesBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
cfFiles_ = java.util.Collections.unmodifiableList(cfFiles_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.cfFiles_ = cfFiles_;
} else {
result.cfFiles_ = cfFilesBuilder_.build();
}
result.forBalance_ = forBalance_;
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.RaftServerpb.SnapshotMeta) {
return mergeFrom((org.tikv.kvproto.RaftServerpb.SnapshotMeta)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.RaftServerpb.SnapshotMeta other) {
if (other == org.tikv.kvproto.RaftServerpb.SnapshotMeta.getDefaultInstance()) return this;
if (cfFilesBuilder_ == null) {
if (!other.cfFiles_.isEmpty()) {
if (cfFiles_.isEmpty()) {
cfFiles_ = other.cfFiles_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureCfFilesIsMutable();
cfFiles_.addAll(other.cfFiles_);
}
onChanged();
}
} else {
if (!other.cfFiles_.isEmpty()) {
if (cfFilesBuilder_.isEmpty()) {
cfFilesBuilder_.dispose();
cfFilesBuilder_ = null;
cfFiles_ = other.cfFiles_;
bitField0_ = (bitField0_ & ~0x00000001);
cfFilesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getCfFilesFieldBuilder() : null;
} else {
cfFilesBuilder_.addAllMessages(other.cfFiles_);
}
}
}
if (other.getForBalance() != false) {
setForBalance(other.getForBalance());
}
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.RaftServerpb.SnapshotMeta parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.RaftServerpb.SnapshotMeta) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List cfFiles_ =
java.util.Collections.emptyList();
private void ensureCfFilesIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
cfFiles_ = new java.util.ArrayList(cfFiles_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tikv.kvproto.RaftServerpb.SnapshotCFFile, org.tikv.kvproto.RaftServerpb.SnapshotCFFile.Builder, org.tikv.kvproto.RaftServerpb.SnapshotCFFileOrBuilder> cfFilesBuilder_;
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public java.util.List getCfFilesList() {
if (cfFilesBuilder_ == null) {
return java.util.Collections.unmodifiableList(cfFiles_);
} else {
return cfFilesBuilder_.getMessageList();
}
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public int getCfFilesCount() {
if (cfFilesBuilder_ == null) {
return cfFiles_.size();
} else {
return cfFilesBuilder_.getCount();
}
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public org.tikv.kvproto.RaftServerpb.SnapshotCFFile getCfFiles(int index) {
if (cfFilesBuilder_ == null) {
return cfFiles_.get(index);
} else {
return cfFilesBuilder_.getMessage(index);
}
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public Builder setCfFiles(
int index, org.tikv.kvproto.RaftServerpb.SnapshotCFFile value) {
if (cfFilesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCfFilesIsMutable();
cfFiles_.set(index, value);
onChanged();
} else {
cfFilesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public Builder setCfFiles(
int index, org.tikv.kvproto.RaftServerpb.SnapshotCFFile.Builder builderForValue) {
if (cfFilesBuilder_ == null) {
ensureCfFilesIsMutable();
cfFiles_.set(index, builderForValue.build());
onChanged();
} else {
cfFilesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public Builder addCfFiles(org.tikv.kvproto.RaftServerpb.SnapshotCFFile value) {
if (cfFilesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCfFilesIsMutable();
cfFiles_.add(value);
onChanged();
} else {
cfFilesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public Builder addCfFiles(
int index, org.tikv.kvproto.RaftServerpb.SnapshotCFFile value) {
if (cfFilesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCfFilesIsMutable();
cfFiles_.add(index, value);
onChanged();
} else {
cfFilesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public Builder addCfFiles(
org.tikv.kvproto.RaftServerpb.SnapshotCFFile.Builder builderForValue) {
if (cfFilesBuilder_ == null) {
ensureCfFilesIsMutable();
cfFiles_.add(builderForValue.build());
onChanged();
} else {
cfFilesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public Builder addCfFiles(
int index, org.tikv.kvproto.RaftServerpb.SnapshotCFFile.Builder builderForValue) {
if (cfFilesBuilder_ == null) {
ensureCfFilesIsMutable();
cfFiles_.add(index, builderForValue.build());
onChanged();
} else {
cfFilesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public Builder addAllCfFiles(
java.lang.Iterable extends org.tikv.kvproto.RaftServerpb.SnapshotCFFile> values) {
if (cfFilesBuilder_ == null) {
ensureCfFilesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, cfFiles_);
onChanged();
} else {
cfFilesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public Builder clearCfFiles() {
if (cfFilesBuilder_ == null) {
cfFiles_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
cfFilesBuilder_.clear();
}
return this;
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public Builder removeCfFiles(int index) {
if (cfFilesBuilder_ == null) {
ensureCfFilesIsMutable();
cfFiles_.remove(index);
onChanged();
} else {
cfFilesBuilder_.remove(index);
}
return this;
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public org.tikv.kvproto.RaftServerpb.SnapshotCFFile.Builder getCfFilesBuilder(
int index) {
return getCfFilesFieldBuilder().getBuilder(index);
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public org.tikv.kvproto.RaftServerpb.SnapshotCFFileOrBuilder getCfFilesOrBuilder(
int index) {
if (cfFilesBuilder_ == null) {
return cfFiles_.get(index); } else {
return cfFilesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public java.util.List extends org.tikv.kvproto.RaftServerpb.SnapshotCFFileOrBuilder>
getCfFilesOrBuilderList() {
if (cfFilesBuilder_ != null) {
return cfFilesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(cfFiles_);
}
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public org.tikv.kvproto.RaftServerpb.SnapshotCFFile.Builder addCfFilesBuilder() {
return getCfFilesFieldBuilder().addBuilder(
org.tikv.kvproto.RaftServerpb.SnapshotCFFile.getDefaultInstance());
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public org.tikv.kvproto.RaftServerpb.SnapshotCFFile.Builder addCfFilesBuilder(
int index) {
return getCfFilesFieldBuilder().addBuilder(
index, org.tikv.kvproto.RaftServerpb.SnapshotCFFile.getDefaultInstance());
}
/**
* repeated .raft_serverpb.SnapshotCFFile cf_files = 1;
*/
public java.util.List
getCfFilesBuilderList() {
return getCfFilesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tikv.kvproto.RaftServerpb.SnapshotCFFile, org.tikv.kvproto.RaftServerpb.SnapshotCFFile.Builder, org.tikv.kvproto.RaftServerpb.SnapshotCFFileOrBuilder>
getCfFilesFieldBuilder() {
if (cfFilesBuilder_ == null) {
cfFilesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tikv.kvproto.RaftServerpb.SnapshotCFFile, org.tikv.kvproto.RaftServerpb.SnapshotCFFile.Builder, org.tikv.kvproto.RaftServerpb.SnapshotCFFileOrBuilder>(
cfFiles_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
cfFiles_ = null;
}
return cfFilesBuilder_;
}
private boolean forBalance_ ;
/**
*
* true means this snapshot is triggered for load balance
*
*
* bool for_balance = 2;
*/
public boolean getForBalance() {
return forBalance_;
}
/**
*
* true means this snapshot is triggered for load balance
*
*
* bool for_balance = 2;
*/
public Builder setForBalance(boolean value) {
forBalance_ = value;
onChanged();
return this;
}
/**
*
* true means this snapshot is triggered for load balance
*
*
* bool for_balance = 2;
*/
public Builder clearForBalance() {
forBalance_ = 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:raft_serverpb.SnapshotMeta)
}
// @@protoc_insertion_point(class_scope:raft_serverpb.SnapshotMeta)
private static final org.tikv.kvproto.RaftServerpb.SnapshotMeta DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.RaftServerpb.SnapshotMeta();
}
public static org.tikv.kvproto.RaftServerpb.SnapshotMeta getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public SnapshotMeta parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SnapshotMeta(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.RaftServerpb.SnapshotMeta getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SnapshotChunkOrBuilder extends
// @@protoc_insertion_point(interface_extends:raft_serverpb.SnapshotChunk)
com.google.protobuf.MessageOrBuilder {
/**
* .raft_serverpb.RaftMessage message = 1;
*/
boolean hasMessage();
/**
* .raft_serverpb.RaftMessage message = 1;
*/
org.tikv.kvproto.RaftServerpb.RaftMessage getMessage();
/**
* .raft_serverpb.RaftMessage message = 1;
*/
org.tikv.kvproto.RaftServerpb.RaftMessageOrBuilder getMessageOrBuilder();
/**
* bytes data = 2;
*/
com.google.protobuf.ByteString getData();
}
/**
* Protobuf type {@code raft_serverpb.SnapshotChunk}
*/
public static final class SnapshotChunk extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:raft_serverpb.SnapshotChunk)
SnapshotChunkOrBuilder {
private static final long serialVersionUID = 0L;
// Use SnapshotChunk.newBuilder() to construct.
private SnapshotChunk(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SnapshotChunk() {
data_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SnapshotChunk(
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: {
org.tikv.kvproto.RaftServerpb.RaftMessage.Builder subBuilder = null;
if (message_ != null) {
subBuilder = message_.toBuilder();
}
message_ = input.readMessage(org.tikv.kvproto.RaftServerpb.RaftMessage.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(message_);
message_ = subBuilder.buildPartial();
}
break;
}
case 18: {
data_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotChunk_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotChunk_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.RaftServerpb.SnapshotChunk.class, org.tikv.kvproto.RaftServerpb.SnapshotChunk.Builder.class);
}
public static final int MESSAGE_FIELD_NUMBER = 1;
private org.tikv.kvproto.RaftServerpb.RaftMessage message_;
/**
* .raft_serverpb.RaftMessage message = 1;
*/
public boolean hasMessage() {
return message_ != null;
}
/**
* .raft_serverpb.RaftMessage message = 1;
*/
public org.tikv.kvproto.RaftServerpb.RaftMessage getMessage() {
return message_ == null ? org.tikv.kvproto.RaftServerpb.RaftMessage.getDefaultInstance() : message_;
}
/**
* .raft_serverpb.RaftMessage message = 1;
*/
public org.tikv.kvproto.RaftServerpb.RaftMessageOrBuilder getMessageOrBuilder() {
return getMessage();
}
public static final int DATA_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString data_;
/**
* bytes data = 2;
*/
public com.google.protobuf.ByteString getData() {
return data_;
}
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 (message_ != null) {
output.writeMessage(1, getMessage());
}
if (!data_.isEmpty()) {
output.writeBytes(2, data_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (message_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getMessage());
}
if (!data_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, data_);
}
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.RaftServerpb.SnapshotChunk)) {
return super.equals(obj);
}
org.tikv.kvproto.RaftServerpb.SnapshotChunk other = (org.tikv.kvproto.RaftServerpb.SnapshotChunk) obj;
boolean result = true;
result = result && (hasMessage() == other.hasMessage());
if (hasMessage()) {
result = result && getMessage()
.equals(other.getMessage());
}
result = result && getData()
.equals(other.getData());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMessage()) {
hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getMessage().hashCode();
}
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getData().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.RaftServerpb.SnapshotChunk parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotChunk 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.RaftServerpb.SnapshotChunk parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotChunk 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.RaftServerpb.SnapshotChunk parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotChunk parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotChunk parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotChunk 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.RaftServerpb.SnapshotChunk parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotChunk 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.RaftServerpb.SnapshotChunk parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.SnapshotChunk 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.RaftServerpb.SnapshotChunk 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 raft_serverpb.SnapshotChunk}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:raft_serverpb.SnapshotChunk)
org.tikv.kvproto.RaftServerpb.SnapshotChunkOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotChunk_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotChunk_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.RaftServerpb.SnapshotChunk.class, org.tikv.kvproto.RaftServerpb.SnapshotChunk.Builder.class);
}
// Construct using org.tikv.kvproto.RaftServerpb.SnapshotChunk.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
if (messageBuilder_ == null) {
message_ = null;
} else {
message_ = null;
messageBuilder_ = null;
}
data_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_SnapshotChunk_descriptor;
}
public org.tikv.kvproto.RaftServerpb.SnapshotChunk getDefaultInstanceForType() {
return org.tikv.kvproto.RaftServerpb.SnapshotChunk.getDefaultInstance();
}
public org.tikv.kvproto.RaftServerpb.SnapshotChunk build() {
org.tikv.kvproto.RaftServerpb.SnapshotChunk result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.RaftServerpb.SnapshotChunk buildPartial() {
org.tikv.kvproto.RaftServerpb.SnapshotChunk result = new org.tikv.kvproto.RaftServerpb.SnapshotChunk(this);
if (messageBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = messageBuilder_.build();
}
result.data_ = data_;
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.RaftServerpb.SnapshotChunk) {
return mergeFrom((org.tikv.kvproto.RaftServerpb.SnapshotChunk)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.RaftServerpb.SnapshotChunk other) {
if (other == org.tikv.kvproto.RaftServerpb.SnapshotChunk.getDefaultInstance()) return this;
if (other.hasMessage()) {
mergeMessage(other.getMessage());
}
if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
setData(other.getData());
}
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.RaftServerpb.SnapshotChunk parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.RaftServerpb.SnapshotChunk) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private org.tikv.kvproto.RaftServerpb.RaftMessage message_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.RaftServerpb.RaftMessage, org.tikv.kvproto.RaftServerpb.RaftMessage.Builder, org.tikv.kvproto.RaftServerpb.RaftMessageOrBuilder> messageBuilder_;
/**
* .raft_serverpb.RaftMessage message = 1;
*/
public boolean hasMessage() {
return messageBuilder_ != null || message_ != null;
}
/**
* .raft_serverpb.RaftMessage message = 1;
*/
public org.tikv.kvproto.RaftServerpb.RaftMessage getMessage() {
if (messageBuilder_ == null) {
return message_ == null ? org.tikv.kvproto.RaftServerpb.RaftMessage.getDefaultInstance() : message_;
} else {
return messageBuilder_.getMessage();
}
}
/**
* .raft_serverpb.RaftMessage message = 1;
*/
public Builder setMessage(org.tikv.kvproto.RaftServerpb.RaftMessage value) {
if (messageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
messageBuilder_.setMessage(value);
}
return this;
}
/**
* .raft_serverpb.RaftMessage message = 1;
*/
public Builder setMessage(
org.tikv.kvproto.RaftServerpb.RaftMessage.Builder builderForValue) {
if (messageBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
messageBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .raft_serverpb.RaftMessage message = 1;
*/
public Builder mergeMessage(org.tikv.kvproto.RaftServerpb.RaftMessage value) {
if (messageBuilder_ == null) {
if (message_ != null) {
message_ =
org.tikv.kvproto.RaftServerpb.RaftMessage.newBuilder(message_).mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
messageBuilder_.mergeFrom(value);
}
return this;
}
/**
* .raft_serverpb.RaftMessage message = 1;
*/
public Builder clearMessage() {
if (messageBuilder_ == null) {
message_ = null;
onChanged();
} else {
message_ = null;
messageBuilder_ = null;
}
return this;
}
/**
* .raft_serverpb.RaftMessage message = 1;
*/
public org.tikv.kvproto.RaftServerpb.RaftMessage.Builder getMessageBuilder() {
onChanged();
return getMessageFieldBuilder().getBuilder();
}
/**
* .raft_serverpb.RaftMessage message = 1;
*/
public org.tikv.kvproto.RaftServerpb.RaftMessageOrBuilder getMessageOrBuilder() {
if (messageBuilder_ != null) {
return messageBuilder_.getMessageOrBuilder();
} else {
return message_ == null ?
org.tikv.kvproto.RaftServerpb.RaftMessage.getDefaultInstance() : message_;
}
}
/**
* .raft_serverpb.RaftMessage message = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.RaftServerpb.RaftMessage, org.tikv.kvproto.RaftServerpb.RaftMessage.Builder, org.tikv.kvproto.RaftServerpb.RaftMessageOrBuilder>
getMessageFieldBuilder() {
if (messageBuilder_ == null) {
messageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.RaftServerpb.RaftMessage, org.tikv.kvproto.RaftServerpb.RaftMessage.Builder, org.tikv.kvproto.RaftServerpb.RaftMessageOrBuilder>(
getMessage(),
getParentForChildren(),
isClean());
message_ = null;
}
return messageBuilder_;
}
private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes data = 2;
*/
public com.google.protobuf.ByteString getData() {
return data_;
}
/**
* bytes data = 2;
*/
public Builder setData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
data_ = value;
onChanged();
return this;
}
/**
* bytes data = 2;
*/
public Builder clearData() {
data_ = getDefaultInstance().getData();
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:raft_serverpb.SnapshotChunk)
}
// @@protoc_insertion_point(class_scope:raft_serverpb.SnapshotChunk)
private static final org.tikv.kvproto.RaftServerpb.SnapshotChunk DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.RaftServerpb.SnapshotChunk();
}
public static org.tikv.kvproto.RaftServerpb.SnapshotChunk getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public SnapshotChunk parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SnapshotChunk(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.RaftServerpb.SnapshotChunk getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DoneOrBuilder extends
// @@protoc_insertion_point(interface_extends:raft_serverpb.Done)
com.google.protobuf.MessageOrBuilder {
}
/**
* Protobuf type {@code raft_serverpb.Done}
*/
public static final class Done extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:raft_serverpb.Done)
DoneOrBuilder {
private static final long serialVersionUID = 0L;
// Use Done.newBuilder() to construct.
private Done(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Done() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Done(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_Done_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_Done_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.RaftServerpb.Done.class, org.tikv.kvproto.RaftServerpb.Done.Builder.class);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tikv.kvproto.RaftServerpb.Done)) {
return super.equals(obj);
}
org.tikv.kvproto.RaftServerpb.Done other = (org.tikv.kvproto.RaftServerpb.Done) obj;
boolean result = true;
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.RaftServerpb.Done parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.Done 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.RaftServerpb.Done parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.Done 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.RaftServerpb.Done parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.RaftServerpb.Done parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.RaftServerpb.Done parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.Done 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.RaftServerpb.Done parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.Done 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.RaftServerpb.Done parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.RaftServerpb.Done 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.RaftServerpb.Done 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 raft_serverpb.Done}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:raft_serverpb.Done)
org.tikv.kvproto.RaftServerpb.DoneOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_Done_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_Done_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.RaftServerpb.Done.class, org.tikv.kvproto.RaftServerpb.Done.Builder.class);
}
// Construct using org.tikv.kvproto.RaftServerpb.Done.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.RaftServerpb.internal_static_raft_serverpb_Done_descriptor;
}
public org.tikv.kvproto.RaftServerpb.Done getDefaultInstanceForType() {
return org.tikv.kvproto.RaftServerpb.Done.getDefaultInstance();
}
public org.tikv.kvproto.RaftServerpb.Done build() {
org.tikv.kvproto.RaftServerpb.Done result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.RaftServerpb.Done buildPartial() {
org.tikv.kvproto.RaftServerpb.Done result = new org.tikv.kvproto.RaftServerpb.Done(this);
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tikv.kvproto.RaftServerpb.Done) {
return mergeFrom((org.tikv.kvproto.RaftServerpb.Done)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.RaftServerpb.Done other) {
if (other == org.tikv.kvproto.RaftServerpb.Done.getDefaultInstance()) return this;
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tikv.kvproto.RaftServerpb.Done parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.RaftServerpb.Done) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:raft_serverpb.Done)
}
// @@protoc_insertion_point(class_scope:raft_serverpb.Done)
private static final org.tikv.kvproto.RaftServerpb.Done DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.RaftServerpb.Done();
}
public static org.tikv.kvproto.RaftServerpb.Done getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
© 2015 - 2024 Weber Informatics LLC | Privacy Policy