Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
*
* Normal = 0;
*/
public static final int Normal_VALUE = 0;
/**
* Low = 1;
*/
public static final int Low_VALUE = 1;
/**
* High = 2;
*/
public static final int High_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CommandPri valueOf(int value) {
return forNumber(value);
}
public static CommandPri forNumber(int value) {
switch (value) {
case 0: return Normal;
case 1: return Low;
case 2: return High;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
CommandPri> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public CommandPri findValueByNumber(int number) {
return CommandPri.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.Kvrpcpb.getDescriptor().getEnumTypes().get(1);
}
private static final CommandPri[] VALUES = values();
public static CommandPri 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 CommandPri(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:kvrpcpb.CommandPri)
}
/**
* Protobuf enum {@code kvrpcpb.IsolationLevel}
*/
public enum IsolationLevel
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* SI = snapshot isolation
*
*
* SI = 0;
*/
SI(0),
/**
*
* RC = read committed
*
*
* RC = 1;
*/
RC(1),
UNRECOGNIZED(-1),
;
/**
*
* SI = snapshot isolation
*
*
* SI = 0;
*/
public static final int SI_VALUE = 0;
/**
*
* RC = read committed
*
*
* RC = 1;
*/
public static final int RC_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static IsolationLevel valueOf(int value) {
return forNumber(value);
}
public static IsolationLevel forNumber(int value) {
switch (value) {
case 0: return SI;
case 1: return RC;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
IsolationLevel> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public IsolationLevel findValueByNumber(int number) {
return IsolationLevel.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.Kvrpcpb.getDescriptor().getEnumTypes().get(2);
}
private static final IsolationLevel[] VALUES = values();
public static IsolationLevel 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 IsolationLevel(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:kvrpcpb.IsolationLevel)
}
/**
* Protobuf enum {@code kvrpcpb.Op}
*/
public enum Op
implements com.google.protobuf.ProtocolMessageEnum {
/**
* Put = 0;
*/
Put(0),
/**
* Del = 1;
*/
Del(1),
/**
* Lock = 2;
*/
Lock(2),
/**
* Rollback = 3;
*/
Rollback(3),
/**
*
* insert operation has a constraint that key should not exist before.
*
*
* Insert = 4;
*/
Insert(4),
/**
* PessimisticLock = 5;
*/
PessimisticLock(5),
/**
* CheckNotExists = 6;
*/
CheckNotExists(6),
UNRECOGNIZED(-1),
;
/**
* Put = 0;
*/
public static final int Put_VALUE = 0;
/**
* Del = 1;
*/
public static final int Del_VALUE = 1;
/**
* Lock = 2;
*/
public static final int Lock_VALUE = 2;
/**
* Rollback = 3;
*/
public static final int Rollback_VALUE = 3;
/**
*
* insert operation has a constraint that key should not exist before.
*
*
* Insert = 4;
*/
public static final int Insert_VALUE = 4;
/**
* PessimisticLock = 5;
*/
public static final int PessimisticLock_VALUE = 5;
/**
* CheckNotExists = 6;
*/
public static final int CheckNotExists_VALUE = 6;
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 Op valueOf(int value) {
return forNumber(value);
}
public static Op forNumber(int value) {
switch (value) {
case 0: return Put;
case 1: return Del;
case 2: return Lock;
case 3: return Rollback;
case 4: return Insert;
case 5: return PessimisticLock;
case 6: return CheckNotExists;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Op> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Op findValueByNumber(int number) {
return Op.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.Kvrpcpb.getDescriptor().getEnumTypes().get(3);
}
private static final Op[] VALUES = values();
public static Op 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 Op(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:kvrpcpb.Op)
}
/**
* Protobuf enum {@code kvrpcpb.Assertion}
*/
public enum Assertion
implements com.google.protobuf.ProtocolMessageEnum {
/**
* None = 0;
*/
None(0),
/**
* Exist = 1;
*/
Exist(1),
/**
* NotExist = 2;
*/
NotExist(2),
UNRECOGNIZED(-1),
;
/**
* None = 0;
*/
public static final int None_VALUE = 0;
/**
* Exist = 1;
*/
public static final int Exist_VALUE = 1;
/**
* NotExist = 2;
*/
public static final int NotExist_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Assertion valueOf(int value) {
return forNumber(value);
}
public static Assertion forNumber(int value) {
switch (value) {
case 0: return None;
case 1: return Exist;
case 2: return NotExist;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Assertion> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Assertion findValueByNumber(int number) {
return Assertion.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.Kvrpcpb.getDescriptor().getEnumTypes().get(4);
}
private static final Assertion[] VALUES = values();
public static Assertion 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 Assertion(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:kvrpcpb.Assertion)
}
/**
* Protobuf enum {@code kvrpcpb.Action}
*/
public enum Action
implements com.google.protobuf.ProtocolMessageEnum {
/**
* NoAction = 0;
*/
NoAction(0),
/**
* TTLExpireRollback = 1;
*/
TTLExpireRollback(1),
/**
* LockNotExistRollback = 2;
*/
LockNotExistRollback(2),
/**
* MinCommitTSPushed = 3;
*/
MinCommitTSPushed(3),
/**
* TTLExpirePessimisticRollback = 4;
*/
TTLExpirePessimisticRollback(4),
/**
* LockNotExistDoNothing = 5;
*/
LockNotExistDoNothing(5),
UNRECOGNIZED(-1),
;
/**
* NoAction = 0;
*/
public static final int NoAction_VALUE = 0;
/**
* TTLExpireRollback = 1;
*/
public static final int TTLExpireRollback_VALUE = 1;
/**
* LockNotExistRollback = 2;
*/
public static final int LockNotExistRollback_VALUE = 2;
/**
* MinCommitTSPushed = 3;
*/
public static final int MinCommitTSPushed_VALUE = 3;
/**
* TTLExpirePessimisticRollback = 4;
*/
public static final int TTLExpirePessimisticRollback_VALUE = 4;
/**
* LockNotExistDoNothing = 5;
*/
public static final int LockNotExistDoNothing_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 Action valueOf(int value) {
return forNumber(value);
}
public static Action forNumber(int value) {
switch (value) {
case 0: return NoAction;
case 1: return TTLExpireRollback;
case 2: return LockNotExistRollback;
case 3: return MinCommitTSPushed;
case 4: return TTLExpirePessimisticRollback;
case 5: return LockNotExistDoNothing;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Action> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Action findValueByNumber(int number) {
return Action.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.Kvrpcpb.getDescriptor().getEnumTypes().get(5);
}
private static final Action[] VALUES = values();
public static Action 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 Action(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:kvrpcpb.Action)
}
/**
* Protobuf enum {@code kvrpcpb.ExtraOp}
*/
public enum ExtraOp
implements com.google.protobuf.ProtocolMessageEnum {
/**
* Noop = 0;
*/
Noop(0),
/**
*
* ReadOldValue represents to output the previous value for delete/update operations.
*
*
* ReadOldValue = 1;
*/
ReadOldValue(1),
UNRECOGNIZED(-1),
;
/**
* Noop = 0;
*/
public static final int Noop_VALUE = 0;
/**
*
* ReadOldValue represents to output the previous value for delete/update operations.
*
*
* ReadOldValue = 1;
*/
public static final int ReadOldValue_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ExtraOp valueOf(int value) {
return forNumber(value);
}
public static ExtraOp forNumber(int value) {
switch (value) {
case 0: return Noop;
case 1: return ReadOldValue;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ExtraOp> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ExtraOp findValueByNumber(int number) {
return ExtraOp.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.Kvrpcpb.getDescriptor().getEnumTypes().get(6);
}
private static final ExtraOp[] VALUES = values();
public static ExtraOp 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 ExtraOp(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:kvrpcpb.ExtraOp)
}
public interface GetRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:kvrpcpb.GetRequest)
com.google.protobuf.MessageOrBuilder {
/**
* .kvrpcpb.Context context = 1;
*/
boolean hasContext();
/**
* .kvrpcpb.Context context = 1;
*/
org.tikv.kvproto.Kvrpcpb.Context getContext();
/**
* .kvrpcpb.Context context = 1;
*/
org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder();
/**
* bytes key = 2;
*/
com.google.protobuf.ByteString getKey();
/**
* uint64 version = 3;
*/
long getVersion();
}
/**
*
* A transactional get command. Lookup a value for `key` in the transaction with
* starting timestamp = `version`.
*
*
* Protobuf type {@code kvrpcpb.GetRequest}
*/
public static final class GetRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.GetRequest)
GetRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetRequest.newBuilder() to construct.
private GetRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GetRequest() {
key_ = com.google.protobuf.ByteString.EMPTY;
version_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetRequest(
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.Kvrpcpb.Context.Builder subBuilder = null;
if (context_ != null) {
subBuilder = context_.toBuilder();
}
context_ = input.readMessage(org.tikv.kvproto.Kvrpcpb.Context.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(context_);
context_ = subBuilder.buildPartial();
}
break;
}
case 18: {
key_ = input.readBytes();
break;
}
case 24: {
version_ = input.readUInt64();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_GetRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_GetRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.GetRequest.class, org.tikv.kvproto.Kvrpcpb.GetRequest.Builder.class);
}
public static final int CONTEXT_FIELD_NUMBER = 1;
private org.tikv.kvproto.Kvrpcpb.Context context_;
/**
* .kvrpcpb.Context context = 1;
*/
public boolean hasContext() {
return context_ != null;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.Context getContext() {
return context_ == null ? org.tikv.kvproto.Kvrpcpb.Context.getDefaultInstance() : context_;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder() {
return getContext();
}
public static final int KEY_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString key_;
/**
* bytes key = 2;
*/
public com.google.protobuf.ByteString getKey() {
return key_;
}
public static final int VERSION_FIELD_NUMBER = 3;
private long version_;
/**
* uint64 version = 3;
*/
public long getVersion() {
return version_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (context_ != null) {
output.writeMessage(1, getContext());
}
if (!key_.isEmpty()) {
output.writeBytes(2, key_);
}
if (version_ != 0L) {
output.writeUInt64(3, version_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (context_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getContext());
}
if (!key_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, key_);
}
if (version_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, version_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tikv.kvproto.Kvrpcpb.GetRequest)) {
return super.equals(obj);
}
org.tikv.kvproto.Kvrpcpb.GetRequest other = (org.tikv.kvproto.Kvrpcpb.GetRequest) obj;
boolean result = true;
result = result && (hasContext() == other.hasContext());
if (hasContext()) {
result = result && getContext()
.equals(other.getContext());
}
result = result && getKey()
.equals(other.getKey());
result = result && (getVersion()
== other.getVersion());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasContext()) {
hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + getContext().hashCode();
}
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getVersion());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Kvrpcpb.GetRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.GetRequest 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.Kvrpcpb.GetRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.GetRequest 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.Kvrpcpb.GetRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.GetRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Kvrpcpb.GetRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.GetRequest 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.Kvrpcpb.GetRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.GetRequest 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.Kvrpcpb.GetRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.GetRequest 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.Kvrpcpb.GetRequest 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;
}
/**
*
* A transactional get command. Lookup a value for `key` in the transaction with
* starting timestamp = `version`.
*
*
* Protobuf type {@code kvrpcpb.GetRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:kvrpcpb.GetRequest)
org.tikv.kvproto.Kvrpcpb.GetRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_GetRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_GetRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.GetRequest.class, org.tikv.kvproto.Kvrpcpb.GetRequest.Builder.class);
}
// Construct using org.tikv.kvproto.Kvrpcpb.GetRequest.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 (contextBuilder_ == null) {
context_ = null;
} else {
context_ = null;
contextBuilder_ = null;
}
key_ = com.google.protobuf.ByteString.EMPTY;
version_ = 0L;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_GetRequest_descriptor;
}
public org.tikv.kvproto.Kvrpcpb.GetRequest getDefaultInstanceForType() {
return org.tikv.kvproto.Kvrpcpb.GetRequest.getDefaultInstance();
}
public org.tikv.kvproto.Kvrpcpb.GetRequest build() {
org.tikv.kvproto.Kvrpcpb.GetRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.Kvrpcpb.GetRequest buildPartial() {
org.tikv.kvproto.Kvrpcpb.GetRequest result = new org.tikv.kvproto.Kvrpcpb.GetRequest(this);
if (contextBuilder_ == null) {
result.context_ = context_;
} else {
result.context_ = contextBuilder_.build();
}
result.key_ = key_;
result.version_ = version_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tikv.kvproto.Kvrpcpb.GetRequest) {
return mergeFrom((org.tikv.kvproto.Kvrpcpb.GetRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.Kvrpcpb.GetRequest other) {
if (other == org.tikv.kvproto.Kvrpcpb.GetRequest.getDefaultInstance()) return this;
if (other.hasContext()) {
mergeContext(other.getContext());
}
if (other.getKey() != com.google.protobuf.ByteString.EMPTY) {
setKey(other.getKey());
}
if (other.getVersion() != 0L) {
setVersion(other.getVersion());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tikv.kvproto.Kvrpcpb.GetRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.Kvrpcpb.GetRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private org.tikv.kvproto.Kvrpcpb.Context context_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Kvrpcpb.Context, org.tikv.kvproto.Kvrpcpb.Context.Builder, org.tikv.kvproto.Kvrpcpb.ContextOrBuilder> contextBuilder_;
/**
* .kvrpcpb.Context context = 1;
*/
public boolean hasContext() {
return contextBuilder_ != null || context_ != null;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.Context getContext() {
if (contextBuilder_ == null) {
return context_ == null ? org.tikv.kvproto.Kvrpcpb.Context.getDefaultInstance() : context_;
} else {
return contextBuilder_.getMessage();
}
}
/**
* .kvrpcpb.Context context = 1;
*/
public Builder setContext(org.tikv.kvproto.Kvrpcpb.Context value) {
if (contextBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
context_ = value;
onChanged();
} else {
contextBuilder_.setMessage(value);
}
return this;
}
/**
* .kvrpcpb.Context context = 1;
*/
public Builder setContext(
org.tikv.kvproto.Kvrpcpb.Context.Builder builderForValue) {
if (contextBuilder_ == null) {
context_ = builderForValue.build();
onChanged();
} else {
contextBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .kvrpcpb.Context context = 1;
*/
public Builder mergeContext(org.tikv.kvproto.Kvrpcpb.Context value) {
if (contextBuilder_ == null) {
if (context_ != null) {
context_ =
org.tikv.kvproto.Kvrpcpb.Context.newBuilder(context_).mergeFrom(value).buildPartial();
} else {
context_ = value;
}
onChanged();
} else {
contextBuilder_.mergeFrom(value);
}
return this;
}
/**
* .kvrpcpb.Context context = 1;
*/
public Builder clearContext() {
if (contextBuilder_ == null) {
context_ = null;
onChanged();
} else {
context_ = null;
contextBuilder_ = null;
}
return this;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.Context.Builder getContextBuilder() {
onChanged();
return getContextFieldBuilder().getBuilder();
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder() {
if (contextBuilder_ != null) {
return contextBuilder_.getMessageOrBuilder();
} else {
return context_ == null ?
org.tikv.kvproto.Kvrpcpb.Context.getDefaultInstance() : context_;
}
}
/**
* .kvrpcpb.Context context = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Kvrpcpb.Context, org.tikv.kvproto.Kvrpcpb.Context.Builder, org.tikv.kvproto.Kvrpcpb.ContextOrBuilder>
getContextFieldBuilder() {
if (contextBuilder_ == null) {
contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Kvrpcpb.Context, org.tikv.kvproto.Kvrpcpb.Context.Builder, org.tikv.kvproto.Kvrpcpb.ContextOrBuilder>(
getContext(),
getParentForChildren(),
isClean());
context_ = null;
}
return contextBuilder_;
}
private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes key = 2;
*/
public com.google.protobuf.ByteString getKey() {
return key_;
}
/**
* bytes key = 2;
*/
public Builder setKey(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
* bytes key = 2;
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
private long version_ ;
/**
* uint64 version = 3;
*/
public long getVersion() {
return version_;
}
/**
* uint64 version = 3;
*/
public Builder setVersion(long value) {
version_ = value;
onChanged();
return this;
}
/**
* uint64 version = 3;
*/
public Builder clearVersion() {
version_ = 0L;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:kvrpcpb.GetRequest)
}
// @@protoc_insertion_point(class_scope:kvrpcpb.GetRequest)
private static final org.tikv.kvproto.Kvrpcpb.GetRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Kvrpcpb.GetRequest();
}
public static org.tikv.kvproto.Kvrpcpb.GetRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public GetRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetRequest(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.Kvrpcpb.GetRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface GetResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:kvrpcpb.GetResponse)
com.google.protobuf.MessageOrBuilder {
/**
*
* A region error indicates that the request was sent to the wrong TiKV node
* (or other, similar errors).
*
* For compatibility, when scanning forward, the range to scan is [start_key, end_key), where start_key < end_key;
* and when scanning backward, it scans [end_key, start_key) in descending order, where end_key < start_key.
*
* Scan fetches values for a range of keys; it is part of the transaction with
* starting timestamp = `version`.
*
*
* Protobuf type {@code kvrpcpb.ScanRequest}
*/
public static final class ScanRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.ScanRequest)
ScanRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use ScanRequest.newBuilder() to construct.
private ScanRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ScanRequest() {
startKey_ = com.google.protobuf.ByteString.EMPTY;
limit_ = 0;
version_ = 0L;
keyOnly_ = false;
reverse_ = false;
endKey_ = com.google.protobuf.ByteString.EMPTY;
sampleStep_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ScanRequest(
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.Kvrpcpb.Context.Builder subBuilder = null;
if (context_ != null) {
subBuilder = context_.toBuilder();
}
context_ = input.readMessage(org.tikv.kvproto.Kvrpcpb.Context.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(context_);
context_ = subBuilder.buildPartial();
}
break;
}
case 18: {
startKey_ = input.readBytes();
break;
}
case 24: {
limit_ = input.readUInt32();
break;
}
case 32: {
version_ = input.readUInt64();
break;
}
case 40: {
keyOnly_ = input.readBool();
break;
}
case 48: {
reverse_ = input.readBool();
break;
}
case 58: {
endKey_ = input.readBytes();
break;
}
case 64: {
sampleStep_ = 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.Kvrpcpb.internal_static_kvrpcpb_ScanRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_ScanRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.ScanRequest.class, org.tikv.kvproto.Kvrpcpb.ScanRequest.Builder.class);
}
public static final int CONTEXT_FIELD_NUMBER = 1;
private org.tikv.kvproto.Kvrpcpb.Context context_;
/**
* .kvrpcpb.Context context = 1;
*/
public boolean hasContext() {
return context_ != null;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.Context getContext() {
return context_ == null ? org.tikv.kvproto.Kvrpcpb.Context.getDefaultInstance() : context_;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder() {
return getContext();
}
public static final int START_KEY_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString startKey_;
/**
* bytes start_key = 2;
*/
public com.google.protobuf.ByteString getStartKey() {
return startKey_;
}
public static final int LIMIT_FIELD_NUMBER = 3;
private int limit_;
/**
*
* The maximum number of results to return.
*
*
* uint32 limit = 3;
*/
public int getLimit() {
return limit_;
}
public static final int VERSION_FIELD_NUMBER = 4;
private long version_;
/**
* uint64 version = 4;
*/
public long getVersion() {
return version_;
}
public static final int KEY_ONLY_FIELD_NUMBER = 5;
private boolean keyOnly_;
/**
*
* Return only the keys found by scanning, not their values.
*
*
* bool key_only = 5;
*/
public boolean getKeyOnly() {
return keyOnly_;
}
public static final int REVERSE_FIELD_NUMBER = 6;
private boolean reverse_;
/**
* bool reverse = 6;
*/
public boolean getReverse() {
return reverse_;
}
public static final int END_KEY_FIELD_NUMBER = 7;
private com.google.protobuf.ByteString endKey_;
/**
*
* For compatibility, when scanning forward, the range to scan is [start_key, end_key), where start_key < end_key;
* and when scanning backward, it scans [end_key, start_key) in descending order, where end_key < start_key.
*
*
* bytes end_key = 7;
*/
public com.google.protobuf.ByteString getEndKey() {
return endKey_;
}
public static final int SAMPLE_STEP_FIELD_NUMBER = 8;
private int sampleStep_;
/**
*
* If sample_step > 0, skips 'sample_step - 1' number of keys after each returned key.
* locks are not checked.
*
*
* uint32 sample_step = 8;
*/
public int getSampleStep() {
return sampleStep_;
}
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 (context_ != null) {
output.writeMessage(1, getContext());
}
if (!startKey_.isEmpty()) {
output.writeBytes(2, startKey_);
}
if (limit_ != 0) {
output.writeUInt32(3, limit_);
}
if (version_ != 0L) {
output.writeUInt64(4, version_);
}
if (keyOnly_ != false) {
output.writeBool(5, keyOnly_);
}
if (reverse_ != false) {
output.writeBool(6, reverse_);
}
if (!endKey_.isEmpty()) {
output.writeBytes(7, endKey_);
}
if (sampleStep_ != 0) {
output.writeUInt32(8, sampleStep_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (context_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getContext());
}
if (!startKey_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, startKey_);
}
if (limit_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, limit_);
}
if (version_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, version_);
}
if (keyOnly_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, keyOnly_);
}
if (reverse_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, reverse_);
}
if (!endKey_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(7, endKey_);
}
if (sampleStep_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(8, sampleStep_);
}
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.Kvrpcpb.ScanRequest)) {
return super.equals(obj);
}
org.tikv.kvproto.Kvrpcpb.ScanRequest other = (org.tikv.kvproto.Kvrpcpb.ScanRequest) obj;
boolean result = true;
result = result && (hasContext() == other.hasContext());
if (hasContext()) {
result = result && getContext()
.equals(other.getContext());
}
result = result && getStartKey()
.equals(other.getStartKey());
result = result && (getLimit()
== other.getLimit());
result = result && (getVersion()
== other.getVersion());
result = result && (getKeyOnly()
== other.getKeyOnly());
result = result && (getReverse()
== other.getReverse());
result = result && getEndKey()
.equals(other.getEndKey());
result = result && (getSampleStep()
== other.getSampleStep());
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 (hasContext()) {
hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + getContext().hashCode();
}
hash = (37 * hash) + START_KEY_FIELD_NUMBER;
hash = (53 * hash) + getStartKey().hashCode();
hash = (37 * hash) + LIMIT_FIELD_NUMBER;
hash = (53 * hash) + getLimit();
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getVersion());
hash = (37 * hash) + KEY_ONLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getKeyOnly());
hash = (37 * hash) + REVERSE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getReverse());
hash = (37 * hash) + END_KEY_FIELD_NUMBER;
hash = (53 * hash) + getEndKey().hashCode();
hash = (37 * hash) + SAMPLE_STEP_FIELD_NUMBER;
hash = (53 * hash) + getSampleStep();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Kvrpcpb.ScanRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.ScanRequest 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.Kvrpcpb.ScanRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.ScanRequest 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.Kvrpcpb.ScanRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.ScanRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Kvrpcpb.ScanRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.ScanRequest 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.Kvrpcpb.ScanRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.ScanRequest 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.Kvrpcpb.ScanRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.ScanRequest 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.Kvrpcpb.ScanRequest 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;
}
/**
*
* Scan fetches values for a range of keys; it is part of the transaction with
* starting timestamp = `version`.
*
* For compatibility, when scanning forward, the range to scan is [start_key, end_key), where start_key < end_key;
* and when scanning backward, it scans [end_key, start_key) in descending order, where end_key < start_key.
*
* For compatibility, when scanning forward, the range to scan is [start_key, end_key), where start_key < end_key;
* and when scanning backward, it scans [end_key, start_key) in descending order, where end_key < start_key.
*
*
* bytes end_key = 7;
*/
public Builder setEndKey(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
endKey_ = value;
onChanged();
return this;
}
/**
*
* For compatibility, when scanning forward, the range to scan is [start_key, end_key), where start_key < end_key;
* and when scanning backward, it scans [end_key, start_key) in descending order, where end_key < start_key.
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
*
* .kvrpcpb.KeyError error = 3;
*/
org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder getErrorOrBuilder();
}
/**
* Protobuf type {@code kvrpcpb.ScanResponse}
*/
public static final class ScanResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.ScanResponse)
ScanResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use ScanResponse.newBuilder() to construct.
private ScanResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ScanResponse() {
pairs_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ScanResponse(
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.Errorpb.Error.Builder subBuilder = null;
if (regionError_ != null) {
subBuilder = regionError_.toBuilder();
}
regionError_ = input.readMessage(org.tikv.kvproto.Errorpb.Error.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(regionError_);
regionError_ = subBuilder.buildPartial();
}
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
pairs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
pairs_.add(
input.readMessage(org.tikv.kvproto.Kvrpcpb.KvPair.parser(), extensionRegistry));
break;
}
case 26: {
org.tikv.kvproto.Kvrpcpb.KeyError.Builder subBuilder = null;
if (error_ != null) {
subBuilder = error_.toBuilder();
}
error_ = input.readMessage(org.tikv.kvproto.Kvrpcpb.KeyError.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(error_);
error_ = subBuilder.buildPartial();
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
pairs_ = java.util.Collections.unmodifiableList(pairs_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_ScanResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_ScanResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.ScanResponse.class, org.tikv.kvproto.Kvrpcpb.ScanResponse.Builder.class);
}
private int bitField0_;
public static final int REGION_ERROR_FIELD_NUMBER = 1;
private org.tikv.kvproto.Errorpb.Error regionError_;
/**
* .errorpb.Error region_error = 1;
*/
public boolean hasRegionError() {
return regionError_ != null;
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.Error getRegionError() {
return regionError_ == null ? org.tikv.kvproto.Errorpb.Error.getDefaultInstance() : regionError_;
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.ErrorOrBuilder getRegionErrorOrBuilder() {
return getRegionError();
}
public static final int PAIRS_FIELD_NUMBER = 2;
private java.util.List pairs_;
/**
*
*
* repeated .kvrpcpb.KvPair pairs = 2;
*/
public org.tikv.kvproto.Kvrpcpb.KvPairOrBuilder getPairsOrBuilder(
int index) {
return pairs_.get(index);
}
public static final int ERROR_FIELD_NUMBER = 3;
private org.tikv.kvproto.Kvrpcpb.KeyError error_;
/**
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
*
* .kvrpcpb.KeyError error = 3;
*/
public org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder getErrorOrBuilder() {
return getError();
}
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 (regionError_ != null) {
output.writeMessage(1, getRegionError());
}
for (int i = 0; i < pairs_.size(); i++) {
output.writeMessage(2, pairs_.get(i));
}
if (error_ != null) {
output.writeMessage(3, getError());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (regionError_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getRegionError());
}
for (int i = 0; i < pairs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, pairs_.get(i));
}
if (error_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getError());
}
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.Kvrpcpb.ScanResponse)) {
return super.equals(obj);
}
org.tikv.kvproto.Kvrpcpb.ScanResponse other = (org.tikv.kvproto.Kvrpcpb.ScanResponse) obj;
boolean result = true;
result = result && (hasRegionError() == other.hasRegionError());
if (hasRegionError()) {
result = result && getRegionError()
.equals(other.getRegionError());
}
result = result && getPairsList()
.equals(other.getPairsList());
result = result && (hasError() == other.hasError());
if (hasError()) {
result = result && getError()
.equals(other.getError());
}
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 (hasRegionError()) {
hash = (37 * hash) + REGION_ERROR_FIELD_NUMBER;
hash = (53 * hash) + getRegionError().hashCode();
}
if (getPairsCount() > 0) {
hash = (37 * hash) + PAIRS_FIELD_NUMBER;
hash = (53 * hash) + getPairsList().hashCode();
}
if (hasError()) {
hash = (37 * hash) + ERROR_FIELD_NUMBER;
hash = (53 * hash) + getError().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Kvrpcpb.ScanResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.ScanResponse 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.Kvrpcpb.ScanResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.ScanResponse 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.Kvrpcpb.ScanResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.ScanResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Kvrpcpb.ScanResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.ScanResponse 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.Kvrpcpb.ScanResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.ScanResponse 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.Kvrpcpb.ScanResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.ScanResponse 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.Kvrpcpb.ScanResponse 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 kvrpcpb.ScanResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:kvrpcpb.ScanResponse)
org.tikv.kvproto.Kvrpcpb.ScanResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_ScanResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_ScanResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.ScanResponse.class, org.tikv.kvproto.Kvrpcpb.ScanResponse.Builder.class);
}
// Construct using org.tikv.kvproto.Kvrpcpb.ScanResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPairsFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (regionErrorBuilder_ == null) {
regionError_ = null;
} else {
regionError_ = null;
regionErrorBuilder_ = null;
}
if (pairsBuilder_ == null) {
pairs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
pairsBuilder_.clear();
}
if (errorBuilder_ == null) {
error_ = null;
} else {
error_ = null;
errorBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_ScanResponse_descriptor;
}
public org.tikv.kvproto.Kvrpcpb.ScanResponse getDefaultInstanceForType() {
return org.tikv.kvproto.Kvrpcpb.ScanResponse.getDefaultInstance();
}
public org.tikv.kvproto.Kvrpcpb.ScanResponse build() {
org.tikv.kvproto.Kvrpcpb.ScanResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tikv.kvproto.Kvrpcpb.ScanResponse buildPartial() {
org.tikv.kvproto.Kvrpcpb.ScanResponse result = new org.tikv.kvproto.Kvrpcpb.ScanResponse(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (regionErrorBuilder_ == null) {
result.regionError_ = regionError_;
} else {
result.regionError_ = regionErrorBuilder_.build();
}
if (pairsBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
pairs_ = java.util.Collections.unmodifiableList(pairs_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.pairs_ = pairs_;
} else {
result.pairs_ = pairsBuilder_.build();
}
if (errorBuilder_ == null) {
result.error_ = error_;
} else {
result.error_ = errorBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tikv.kvproto.Kvrpcpb.ScanResponse) {
return mergeFrom((org.tikv.kvproto.Kvrpcpb.ScanResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tikv.kvproto.Kvrpcpb.ScanResponse other) {
if (other == org.tikv.kvproto.Kvrpcpb.ScanResponse.getDefaultInstance()) return this;
if (other.hasRegionError()) {
mergeRegionError(other.getRegionError());
}
if (pairsBuilder_ == null) {
if (!other.pairs_.isEmpty()) {
if (pairs_.isEmpty()) {
pairs_ = other.pairs_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensurePairsIsMutable();
pairs_.addAll(other.pairs_);
}
onChanged();
}
} else {
if (!other.pairs_.isEmpty()) {
if (pairsBuilder_.isEmpty()) {
pairsBuilder_.dispose();
pairsBuilder_ = null;
pairs_ = other.pairs_;
bitField0_ = (bitField0_ & ~0x00000002);
pairsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPairsFieldBuilder() : null;
} else {
pairsBuilder_.addAllMessages(other.pairs_);
}
}
}
if (other.hasError()) {
mergeError(other.getError());
}
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.Kvrpcpb.ScanResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tikv.kvproto.Kvrpcpb.ScanResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private org.tikv.kvproto.Errorpb.Error regionError_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Errorpb.Error, org.tikv.kvproto.Errorpb.Error.Builder, org.tikv.kvproto.Errorpb.ErrorOrBuilder> regionErrorBuilder_;
/**
* .errorpb.Error region_error = 1;
*/
public boolean hasRegionError() {
return regionErrorBuilder_ != null || regionError_ != null;
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.Error getRegionError() {
if (regionErrorBuilder_ == null) {
return regionError_ == null ? org.tikv.kvproto.Errorpb.Error.getDefaultInstance() : regionError_;
} else {
return regionErrorBuilder_.getMessage();
}
}
/**
* .errorpb.Error region_error = 1;
*/
public Builder setRegionError(org.tikv.kvproto.Errorpb.Error value) {
if (regionErrorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
regionError_ = value;
onChanged();
} else {
regionErrorBuilder_.setMessage(value);
}
return this;
}
/**
* .errorpb.Error region_error = 1;
*/
public Builder setRegionError(
org.tikv.kvproto.Errorpb.Error.Builder builderForValue) {
if (regionErrorBuilder_ == null) {
regionError_ = builderForValue.build();
onChanged();
} else {
regionErrorBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .errorpb.Error region_error = 1;
*/
public Builder mergeRegionError(org.tikv.kvproto.Errorpb.Error value) {
if (regionErrorBuilder_ == null) {
if (regionError_ != null) {
regionError_ =
org.tikv.kvproto.Errorpb.Error.newBuilder(regionError_).mergeFrom(value).buildPartial();
} else {
regionError_ = value;
}
onChanged();
} else {
regionErrorBuilder_.mergeFrom(value);
}
return this;
}
/**
* .errorpb.Error region_error = 1;
*/
public Builder clearRegionError() {
if (regionErrorBuilder_ == null) {
regionError_ = null;
onChanged();
} else {
regionError_ = null;
regionErrorBuilder_ = null;
}
return this;
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.Error.Builder getRegionErrorBuilder() {
onChanged();
return getRegionErrorFieldBuilder().getBuilder();
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.ErrorOrBuilder getRegionErrorOrBuilder() {
if (regionErrorBuilder_ != null) {
return regionErrorBuilder_.getMessageOrBuilder();
} else {
return regionError_ == null ?
org.tikv.kvproto.Errorpb.Error.getDefaultInstance() : regionError_;
}
}
/**
* .errorpb.Error region_error = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Errorpb.Error, org.tikv.kvproto.Errorpb.Error.Builder, org.tikv.kvproto.Errorpb.ErrorOrBuilder>
getRegionErrorFieldBuilder() {
if (regionErrorBuilder_ == null) {
regionErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Errorpb.Error, org.tikv.kvproto.Errorpb.Error.Builder, org.tikv.kvproto.Errorpb.ErrorOrBuilder>(
getRegionError(),
getParentForChildren(),
isClean());
regionError_ = null;
}
return regionErrorBuilder_;
}
private java.util.List pairs_ =
java.util.Collections.emptyList();
private void ensurePairsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
pairs_ = new java.util.ArrayList(pairs_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tikv.kvproto.Kvrpcpb.KvPair, org.tikv.kvproto.Kvrpcpb.KvPair.Builder, org.tikv.kvproto.Kvrpcpb.KvPairOrBuilder> pairsBuilder_;
/**
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
*
* .kvrpcpb.KeyError error = 3;
*/
public Builder setError(org.tikv.kvproto.Kvrpcpb.KeyError value) {
if (errorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
error_ = value;
onChanged();
} else {
errorBuilder_.setMessage(value);
}
return this;
}
/**
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
* This KeyError exists when some key is locked but we cannot check locks of all keys.
* In this case, `pairs` should be empty and the client should redo scanning all the keys
* after resolving the lock.
*
*
* .kvrpcpb.KeyError error = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Kvrpcpb.KeyError, org.tikv.kvproto.Kvrpcpb.KeyError.Builder, org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder>
getErrorFieldBuilder() {
if (errorBuilder_ == null) {
errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tikv.kvproto.Kvrpcpb.KeyError, org.tikv.kvproto.Kvrpcpb.KeyError.Builder, org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder>(
getError(),
getParentForChildren(),
isClean());
error_ = null;
}
return errorBuilder_;
}
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:kvrpcpb.ScanResponse)
}
// @@protoc_insertion_point(class_scope:kvrpcpb.ScanResponse)
private static final org.tikv.kvproto.Kvrpcpb.ScanResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Kvrpcpb.ScanResponse();
}
public static org.tikv.kvproto.Kvrpcpb.ScanResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ScanResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ScanResponse(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.Kvrpcpb.ScanResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PrewriteRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:kvrpcpb.PrewriteRequest)
com.google.protobuf.MessageOrBuilder {
/**
* .kvrpcpb.Context context = 1;
*/
boolean hasContext();
/**
* .kvrpcpb.Context context = 1;
*/
org.tikv.kvproto.Kvrpcpb.Context getContext();
/**
* .kvrpcpb.Context context = 1;
*/
org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder();
/**
*
* The client picks one key to be primary (unrelated to the primary key concept in SQL). This
* key's lock is the source of truth for the state of a transaction. All other locks due to a
* transaction will point to the primary lock.
*
* A prewrite is the first phase of writing to TiKV. It contains all data to be written in a transaction.
* TiKV will write the data in a preliminary state. Data cannot be read until it has been committed.
* The client should only commit a transaction once all prewrites succeed.
*
*
* Protobuf type {@code kvrpcpb.PrewriteRequest}
*/
public static final class PrewriteRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.PrewriteRequest)
PrewriteRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use PrewriteRequest.newBuilder() to construct.
private PrewriteRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PrewriteRequest() {
mutations_ = java.util.Collections.emptyList();
primaryLock_ = com.google.protobuf.ByteString.EMPTY;
startVersion_ = 0L;
lockTtl_ = 0L;
skipConstraintCheck_ = false;
isPessimisticLock_ = java.util.Collections.emptyList();
txnSize_ = 0L;
forUpdateTs_ = 0L;
minCommitTs_ = 0L;
useAsyncCommit_ = false;
secondaries_ = java.util.Collections.emptyList();
tryOnePc_ = false;
maxCommitTs_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PrewriteRequest(
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.Kvrpcpb.Context.Builder subBuilder = null;
if (context_ != null) {
subBuilder = context_.toBuilder();
}
context_ = input.readMessage(org.tikv.kvproto.Kvrpcpb.Context.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(context_);
context_ = subBuilder.buildPartial();
}
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
mutations_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
mutations_.add(
input.readMessage(org.tikv.kvproto.Kvrpcpb.Mutation.parser(), extensionRegistry));
break;
}
case 26: {
primaryLock_ = input.readBytes();
break;
}
case 32: {
startVersion_ = input.readUInt64();
break;
}
case 40: {
lockTtl_ = input.readUInt64();
break;
}
case 48: {
skipConstraintCheck_ = input.readBool();
break;
}
case 56: {
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
isPessimisticLock_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000040;
}
isPessimisticLock_.add(input.readBool());
break;
}
case 58: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040) && input.getBytesUntilLimit() > 0) {
isPessimisticLock_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000040;
}
while (input.getBytesUntilLimit() > 0) {
isPessimisticLock_.add(input.readBool());
}
input.popLimit(limit);
break;
}
case 64: {
txnSize_ = input.readUInt64();
break;
}
case 72: {
forUpdateTs_ = input.readUInt64();
break;
}
case 80: {
minCommitTs_ = input.readUInt64();
break;
}
case 88: {
useAsyncCommit_ = input.readBool();
break;
}
case 98: {
if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) {
secondaries_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000800;
}
secondaries_.add(input.readBytes());
break;
}
case 104: {
tryOnePc_ = input.readBool();
break;
}
case 112: {
maxCommitTs_ = 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 {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
mutations_ = java.util.Collections.unmodifiableList(mutations_);
}
if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
isPessimisticLock_ = java.util.Collections.unmodifiableList(isPessimisticLock_);
}
if (((mutable_bitField0_ & 0x00000800) == 0x00000800)) {
secondaries_ = java.util.Collections.unmodifiableList(secondaries_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_PrewriteRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_PrewriteRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.PrewriteRequest.class, org.tikv.kvproto.Kvrpcpb.PrewriteRequest.Builder.class);
}
private int bitField0_;
public static final int CONTEXT_FIELD_NUMBER = 1;
private org.tikv.kvproto.Kvrpcpb.Context context_;
/**
* .kvrpcpb.Context context = 1;
*/
public boolean hasContext() {
return context_ != null;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.Context getContext() {
return context_ == null ? org.tikv.kvproto.Kvrpcpb.Context.getDefaultInstance() : context_;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder() {
return getContext();
}
public static final int MUTATIONS_FIELD_NUMBER = 2;
private java.util.List mutations_;
/**
*
*
* repeated .kvrpcpb.Mutation mutations = 2;
*/
public org.tikv.kvproto.Kvrpcpb.MutationOrBuilder getMutationsOrBuilder(
int index) {
return mutations_.get(index);
}
public static final int PRIMARY_LOCK_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString primaryLock_;
/**
*
* The client picks one key to be primary (unrelated to the primary key concept in SQL). This
* key's lock is the source of truth for the state of a transaction. All other locks due to a
* transaction will point to the primary lock.
*
*
* bytes primary_lock = 3;
*/
public com.google.protobuf.ByteString getPrimaryLock() {
return primaryLock_;
}
public static final int START_VERSION_FIELD_NUMBER = 4;
private long startVersion_;
/**
*
* Identifies the transaction being written.
*
*
* uint64 start_version = 4;
*/
public long getStartVersion() {
return startVersion_;
}
public static final int LOCK_TTL_FIELD_NUMBER = 5;
private long lockTtl_;
/**
* uint64 lock_ttl = 5;
*/
public long getLockTtl() {
return lockTtl_;
}
public static final int SKIP_CONSTRAINT_CHECK_FIELD_NUMBER = 6;
private boolean skipConstraintCheck_;
/**
*
* TiKV can skip some checks, used for speeding up data migration.
*
*
* bool skip_constraint_check = 6;
*/
public boolean getSkipConstraintCheck() {
return skipConstraintCheck_;
}
public static final int IS_PESSIMISTIC_LOCK_FIELD_NUMBER = 7;
private java.util.List isPessimisticLock_;
/**
*
* For pessimistic transaction, some mutations don't need to be locked, for example, non-unique index key.
*
* For pessimistic transaction, some mutations don't need to be locked, for example, non-unique index key.
*
*
* repeated bool is_pessimistic_lock = 7;
*/
public int getIsPessimisticLockCount() {
return isPessimisticLock_.size();
}
/**
*
* For pessimistic transaction, some mutations don't need to be locked, for example, non-unique index key.
*
*
* repeated bool is_pessimistic_lock = 7;
*/
public boolean getIsPessimisticLock(int index) {
return isPessimisticLock_.get(index);
}
private int isPessimisticLockMemoizedSerializedSize = -1;
public static final int TXN_SIZE_FIELD_NUMBER = 8;
private long txnSize_;
/**
*
* How many keys this transaction involves in this region.
*
*
* uint64 txn_size = 8;
*/
public long getTxnSize() {
return txnSize_;
}
public static final int FOR_UPDATE_TS_FIELD_NUMBER = 9;
private long forUpdateTs_;
/**
*
* For pessimistic transactions only; used to check if a conflict lock is already committed.
*
*
* uint64 for_update_ts = 9;
*/
public long getForUpdateTs() {
return forUpdateTs_;
}
public static final int MIN_COMMIT_TS_FIELD_NUMBER = 10;
private long minCommitTs_;
/**
*
* If min_commit_ts > 0, this is a large transaction request, the final commit_ts
* will be inferred from `min_commit_ts`.
*
*
* uint64 min_commit_ts = 10;
*/
public long getMinCommitTs() {
return minCommitTs_;
}
public static final int USE_ASYNC_COMMIT_FIELD_NUMBER = 11;
private boolean useAsyncCommit_;
/**
*
* When async commit is enabled, `secondaries` should be set as the key list of all secondary
* locks if the request prewrites the primary lock.
*
*
* bool use_async_commit = 11;
*/
public boolean getUseAsyncCommit() {
return useAsyncCommit_;
}
public static final int SECONDARIES_FIELD_NUMBER = 12;
private java.util.List secondaries_;
/**
* repeated bytes secondaries = 12;
*/
public java.util.List
getSecondariesList() {
return secondaries_;
}
/**
* repeated bytes secondaries = 12;
*/
public int getSecondariesCount() {
return secondaries_.size();
}
/**
* repeated bytes secondaries = 12;
*/
public com.google.protobuf.ByteString getSecondaries(int index) {
return secondaries_.get(index);
}
public static final int TRY_ONE_PC_FIELD_NUMBER = 13;
private boolean tryOnePc_;
/**
*
* When the transaction involves only one region, it's possible to commit the transaction
* directly with 1PC protocol.
*
*
* bool try_one_pc = 13;
*/
public boolean getTryOnePc() {
return tryOnePc_;
}
public static final int MAX_COMMIT_TS_FIELD_NUMBER = 14;
private long maxCommitTs_;
/**
*
* The max commit ts is reserved for limiting the commit ts of 1PC or async commit, which can be used to avoid
* inconsistency with schema change.
*
*
* uint64 max_commit_ts = 14;
*/
public long getMaxCommitTs() {
return maxCommitTs_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (context_ != null) {
output.writeMessage(1, getContext());
}
for (int i = 0; i < mutations_.size(); i++) {
output.writeMessage(2, mutations_.get(i));
}
if (!primaryLock_.isEmpty()) {
output.writeBytes(3, primaryLock_);
}
if (startVersion_ != 0L) {
output.writeUInt64(4, startVersion_);
}
if (lockTtl_ != 0L) {
output.writeUInt64(5, lockTtl_);
}
if (skipConstraintCheck_ != false) {
output.writeBool(6, skipConstraintCheck_);
}
if (getIsPessimisticLockList().size() > 0) {
output.writeUInt32NoTag(58);
output.writeUInt32NoTag(isPessimisticLockMemoizedSerializedSize);
}
for (int i = 0; i < isPessimisticLock_.size(); i++) {
output.writeBoolNoTag(isPessimisticLock_.get(i));
}
if (txnSize_ != 0L) {
output.writeUInt64(8, txnSize_);
}
if (forUpdateTs_ != 0L) {
output.writeUInt64(9, forUpdateTs_);
}
if (minCommitTs_ != 0L) {
output.writeUInt64(10, minCommitTs_);
}
if (useAsyncCommit_ != false) {
output.writeBool(11, useAsyncCommit_);
}
for (int i = 0; i < secondaries_.size(); i++) {
output.writeBytes(12, secondaries_.get(i));
}
if (tryOnePc_ != false) {
output.writeBool(13, tryOnePc_);
}
if (maxCommitTs_ != 0L) {
output.writeUInt64(14, maxCommitTs_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (context_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getContext());
}
for (int i = 0; i < mutations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, mutations_.get(i));
}
if (!primaryLock_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, primaryLock_);
}
if (startVersion_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, startVersion_);
}
if (lockTtl_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(5, lockTtl_);
}
if (skipConstraintCheck_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, skipConstraintCheck_);
}
{
int dataSize = 0;
dataSize = 1 * getIsPessimisticLockList().size();
size += dataSize;
if (!getIsPessimisticLockList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
isPessimisticLockMemoizedSerializedSize = dataSize;
}
if (txnSize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(8, txnSize_);
}
if (forUpdateTs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(9, forUpdateTs_);
}
if (minCommitTs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(10, minCommitTs_);
}
if (useAsyncCommit_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(11, useAsyncCommit_);
}
{
int dataSize = 0;
for (int i = 0; i < secondaries_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(secondaries_.get(i));
}
size += dataSize;
size += 1 * getSecondariesList().size();
}
if (tryOnePc_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(13, tryOnePc_);
}
if (maxCommitTs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(14, maxCommitTs_);
}
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.Kvrpcpb.PrewriteRequest)) {
return super.equals(obj);
}
org.tikv.kvproto.Kvrpcpb.PrewriteRequest other = (org.tikv.kvproto.Kvrpcpb.PrewriteRequest) obj;
boolean result = true;
result = result && (hasContext() == other.hasContext());
if (hasContext()) {
result = result && getContext()
.equals(other.getContext());
}
result = result && getMutationsList()
.equals(other.getMutationsList());
result = result && getPrimaryLock()
.equals(other.getPrimaryLock());
result = result && (getStartVersion()
== other.getStartVersion());
result = result && (getLockTtl()
== other.getLockTtl());
result = result && (getSkipConstraintCheck()
== other.getSkipConstraintCheck());
result = result && getIsPessimisticLockList()
.equals(other.getIsPessimisticLockList());
result = result && (getTxnSize()
== other.getTxnSize());
result = result && (getForUpdateTs()
== other.getForUpdateTs());
result = result && (getMinCommitTs()
== other.getMinCommitTs());
result = result && (getUseAsyncCommit()
== other.getUseAsyncCommit());
result = result && getSecondariesList()
.equals(other.getSecondariesList());
result = result && (getTryOnePc()
== other.getTryOnePc());
result = result && (getMaxCommitTs()
== other.getMaxCommitTs());
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 (hasContext()) {
hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + getContext().hashCode();
}
if (getMutationsCount() > 0) {
hash = (37 * hash) + MUTATIONS_FIELD_NUMBER;
hash = (53 * hash) + getMutationsList().hashCode();
}
hash = (37 * hash) + PRIMARY_LOCK_FIELD_NUMBER;
hash = (53 * hash) + getPrimaryLock().hashCode();
hash = (37 * hash) + START_VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartVersion());
hash = (37 * hash) + LOCK_TTL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLockTtl());
hash = (37 * hash) + SKIP_CONSTRAINT_CHECK_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSkipConstraintCheck());
if (getIsPessimisticLockCount() > 0) {
hash = (37 * hash) + IS_PESSIMISTIC_LOCK_FIELD_NUMBER;
hash = (53 * hash) + getIsPessimisticLockList().hashCode();
}
hash = (37 * hash) + TXN_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTxnSize());
hash = (37 * hash) + FOR_UPDATE_TS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getForUpdateTs());
hash = (37 * hash) + MIN_COMMIT_TS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMinCommitTs());
hash = (37 * hash) + USE_ASYNC_COMMIT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getUseAsyncCommit());
if (getSecondariesCount() > 0) {
hash = (37 * hash) + SECONDARIES_FIELD_NUMBER;
hash = (53 * hash) + getSecondariesList().hashCode();
}
hash = (37 * hash) + TRY_ONE_PC_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getTryOnePc());
hash = (37 * hash) + MAX_COMMIT_TS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxCommitTs());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Kvrpcpb.PrewriteRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.PrewriteRequest 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.Kvrpcpb.PrewriteRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.PrewriteRequest 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.Kvrpcpb.PrewriteRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.PrewriteRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Kvrpcpb.PrewriteRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.PrewriteRequest 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.Kvrpcpb.PrewriteRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.PrewriteRequest 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.Kvrpcpb.PrewriteRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.PrewriteRequest 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.Kvrpcpb.PrewriteRequest 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;
}
/**
*
* A prewrite is the first phase of writing to TiKV. It contains all data to be written in a transaction.
* TiKV will write the data in a preliminary state. Data cannot be read until it has been committed.
* The client should only commit a transaction once all prewrites succeed.
*
* The client picks one key to be primary (unrelated to the primary key concept in SQL). This
* key's lock is the source of truth for the state of a transaction. All other locks due to a
* transaction will point to the primary lock.
*
* The client picks one key to be primary (unrelated to the primary key concept in SQL). This
* key's lock is the source of truth for the state of a transaction. All other locks due to a
* transaction will point to the primary lock.
*
*
* bytes primary_lock = 3;
*/
public Builder setPrimaryLock(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
primaryLock_ = value;
onChanged();
return this;
}
/**
*
* The client picks one key to be primary (unrelated to the primary key concept in SQL). This
* key's lock is the source of truth for the state of a transaction. All other locks due to a
* transaction will point to the primary lock.
*
* 0 if the min_commit_ts is not ready or any other reason that async
* commit cannot proceed. The client can then fallback to normal way to
* continue committing the transaction if prewrite are all finished.
*
* When the transaction is successfully committed with 1PC protocol, this field will be set to
* the commit ts of the transaction. Otherwise, if TiKV failed to commit it with 1PC or the
* transaction is not 1PC, the value will be 0.
*
*
* uint64 one_pc_commit_ts = 4;
*/
long getOnePcCommitTs();
}
/**
* Protobuf type {@code kvrpcpb.PrewriteResponse}
*/
public static final class PrewriteResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.PrewriteResponse)
PrewriteResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use PrewriteResponse.newBuilder() to construct.
private PrewriteResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PrewriteResponse() {
errors_ = java.util.Collections.emptyList();
minCommitTs_ = 0L;
onePcCommitTs_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PrewriteResponse(
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.Errorpb.Error.Builder subBuilder = null;
if (regionError_ != null) {
subBuilder = regionError_.toBuilder();
}
regionError_ = input.readMessage(org.tikv.kvproto.Errorpb.Error.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(regionError_);
regionError_ = subBuilder.buildPartial();
}
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
errors_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
errors_.add(
input.readMessage(org.tikv.kvproto.Kvrpcpb.KeyError.parser(), extensionRegistry));
break;
}
case 24: {
minCommitTs_ = input.readUInt64();
break;
}
case 32: {
onePcCommitTs_ = 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 {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
errors_ = java.util.Collections.unmodifiableList(errors_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_PrewriteResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_PrewriteResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.PrewriteResponse.class, org.tikv.kvproto.Kvrpcpb.PrewriteResponse.Builder.class);
}
private int bitField0_;
public static final int REGION_ERROR_FIELD_NUMBER = 1;
private org.tikv.kvproto.Errorpb.Error regionError_;
/**
* .errorpb.Error region_error = 1;
*/
public boolean hasRegionError() {
return regionError_ != null;
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.Error getRegionError() {
return regionError_ == null ? org.tikv.kvproto.Errorpb.Error.getDefaultInstance() : regionError_;
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.ErrorOrBuilder getRegionErrorOrBuilder() {
return getRegionError();
}
public static final int ERRORS_FIELD_NUMBER = 2;
private java.util.List errors_;
/**
* repeated .kvrpcpb.KeyError errors = 2;
*/
public java.util.List getErrorsList() {
return errors_;
}
/**
* repeated .kvrpcpb.KeyError errors = 2;
*/
public java.util.List extends org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder>
getErrorsOrBuilderList() {
return errors_;
}
/**
* repeated .kvrpcpb.KeyError errors = 2;
*/
public int getErrorsCount() {
return errors_.size();
}
/**
* repeated .kvrpcpb.KeyError errors = 2;
*/
public org.tikv.kvproto.Kvrpcpb.KeyError getErrors(int index) {
return errors_.get(index);
}
/**
* repeated .kvrpcpb.KeyError errors = 2;
*/
public org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder getErrorsOrBuilder(
int index) {
return errors_.get(index);
}
public static final int MIN_COMMIT_TS_FIELD_NUMBER = 3;
private long minCommitTs_;
/**
*
* 0 if the min_commit_ts is not ready or any other reason that async
* commit cannot proceed. The client can then fallback to normal way to
* continue committing the transaction if prewrite are all finished.
*
*
* uint64 min_commit_ts = 3;
*/
public long getMinCommitTs() {
return minCommitTs_;
}
public static final int ONE_PC_COMMIT_TS_FIELD_NUMBER = 4;
private long onePcCommitTs_;
/**
*
* When the transaction is successfully committed with 1PC protocol, this field will be set to
* the commit ts of the transaction. Otherwise, if TiKV failed to commit it with 1PC or the
* transaction is not 1PC, the value will be 0.
*
* 0 if the min_commit_ts is not ready or any other reason that async
* commit cannot proceed. The client can then fallback to normal way to
* continue committing the transaction if prewrite are all finished.
*
*
* uint64 min_commit_ts = 3;
*/
public long getMinCommitTs() {
return minCommitTs_;
}
/**
*
* 0 if the min_commit_ts is not ready or any other reason that async
* commit cannot proceed. The client can then fallback to normal way to
* continue committing the transaction if prewrite are all finished.
*
* 0 if the min_commit_ts is not ready or any other reason that async
* commit cannot proceed. The client can then fallback to normal way to
* continue committing the transaction if prewrite are all finished.
*
* When the transaction is successfully committed with 1PC protocol, this field will be set to
* the commit ts of the transaction. Otherwise, if TiKV failed to commit it with 1PC or the
* transaction is not 1PC, the value will be 0.
*
*
* uint64 one_pc_commit_ts = 4;
*/
public long getOnePcCommitTs() {
return onePcCommitTs_;
}
/**
*
* When the transaction is successfully committed with 1PC protocol, this field will be set to
* the commit ts of the transaction. Otherwise, if TiKV failed to commit it with 1PC or the
* transaction is not 1PC, the value will be 0.
*
* When the transaction is successfully committed with 1PC protocol, this field will be set to
* the commit ts of the transaction. Otherwise, if TiKV failed to commit it with 1PC or the
* transaction is not 1PC, the value will be 0.
*
*
* uint64 one_pc_commit_ts = 4;
*/
public Builder clearOnePcCommitTs() {
onePcCommitTs_ = 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:kvrpcpb.PrewriteResponse)
}
// @@protoc_insertion_point(class_scope:kvrpcpb.PrewriteResponse)
private static final org.tikv.kvproto.Kvrpcpb.PrewriteResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Kvrpcpb.PrewriteResponse();
}
public static org.tikv.kvproto.Kvrpcpb.PrewriteResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public PrewriteResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PrewriteResponse(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.Kvrpcpb.PrewriteResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PessimisticLockRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:kvrpcpb.PessimisticLockRequest)
com.google.protobuf.MessageOrBuilder {
/**
* .kvrpcpb.Context context = 1;
*/
boolean hasContext();
/**
* .kvrpcpb.Context context = 1;
*/
org.tikv.kvproto.Kvrpcpb.Context getContext();
/**
* .kvrpcpb.Context context = 1;
*/
org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder();
/**
*
* In this case every `Op` of the mutations must be `PessimisticLock`.
*
* Each locking command in a pessimistic transaction has its own timestamp. If locking fails, then
* the corresponding SQL statement can be retried with a later timestamp, TiDB does not need to
* retry the whole transaction. The name comes from the `SELECT ... FOR UPDATE` SQL statement which
* is a locking read. Each `SELECT ... FOR UPDATE` in a transaction will be assigned its own
* timestamp.
*
* If it is true, TiKV will acquire the pessimistic lock regardless of write conflict
* and return the latest value. It's only supported for single mutation.
*
*
* bool force = 9;
*/
boolean getForce();
/**
*
* If it is true, TiKV will return values of the keys if no error, so TiDB can cache the values for
* later read in the same transaction.
* When 'force' is set to true, this field is ignored.
*
* In this case every `Op` of the mutations must be `PessimisticLock`.
*
*
* repeated .kvrpcpb.Mutation mutations = 2;
*/
public org.tikv.kvproto.Kvrpcpb.MutationOrBuilder getMutationsOrBuilder(
int index) {
return mutations_.get(index);
}
public static final int PRIMARY_LOCK_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString primaryLock_;
/**
* bytes primary_lock = 3;
*/
public com.google.protobuf.ByteString getPrimaryLock() {
return primaryLock_;
}
public static final int START_VERSION_FIELD_NUMBER = 4;
private long startVersion_;
/**
* uint64 start_version = 4;
*/
public long getStartVersion() {
return startVersion_;
}
public static final int LOCK_TTL_FIELD_NUMBER = 5;
private long lockTtl_;
/**
* uint64 lock_ttl = 5;
*/
public long getLockTtl() {
return lockTtl_;
}
public static final int FOR_UPDATE_TS_FIELD_NUMBER = 6;
private long forUpdateTs_;
/**
*
* Each locking command in a pessimistic transaction has its own timestamp. If locking fails, then
* the corresponding SQL statement can be retried with a later timestamp, TiDB does not need to
* retry the whole transaction. The name comes from the `SELECT ... FOR UPDATE` SQL statement which
* is a locking read. Each `SELECT ... FOR UPDATE` in a transaction will be assigned its own
* timestamp.
*
*
* uint64 for_update_ts = 6;
*/
public long getForUpdateTs() {
return forUpdateTs_;
}
public static final int IS_FIRST_LOCK_FIELD_NUMBER = 7;
private boolean isFirstLock_;
/**
*
* If the request is the first lock request, we don't need to detect deadlock.
*
*
* bool is_first_lock = 7;
*/
public boolean getIsFirstLock() {
return isFirstLock_;
}
public static final int WAIT_TIMEOUT_FIELD_NUMBER = 8;
private long waitTimeout_;
/**
*
* Time to wait for lock released in milliseconds when encountering locks.
* 0 means using default timeout in TiKV. Negative means no wait.
*
*
* int64 wait_timeout = 8;
*/
public long getWaitTimeout() {
return waitTimeout_;
}
public static final int FORCE_FIELD_NUMBER = 9;
private boolean force_;
/**
*
* If it is true, TiKV will acquire the pessimistic lock regardless of write conflict
* and return the latest value. It's only supported for single mutation.
*
*
* bool force = 9;
*/
public boolean getForce() {
return force_;
}
public static final int RETURN_VALUES_FIELD_NUMBER = 10;
private boolean returnValues_;
/**
*
* If it is true, TiKV will return values of the keys if no error, so TiDB can cache the values for
* later read in the same transaction.
* When 'force' is set to true, this field is ignored.
*
*
* bool return_values = 10;
*/
public boolean getReturnValues() {
return returnValues_;
}
public static final int MIN_COMMIT_TS_FIELD_NUMBER = 11;
private long minCommitTs_;
/**
*
* If min_commit_ts > 0, this is large transaction proto, the final commit_ts
* would be infered from min_commit_ts.
*
*
* uint64 min_commit_ts = 11;
*/
public long getMinCommitTs() {
return minCommitTs_;
}
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 (context_ != null) {
output.writeMessage(1, getContext());
}
for (int i = 0; i < mutations_.size(); i++) {
output.writeMessage(2, mutations_.get(i));
}
if (!primaryLock_.isEmpty()) {
output.writeBytes(3, primaryLock_);
}
if (startVersion_ != 0L) {
output.writeUInt64(4, startVersion_);
}
if (lockTtl_ != 0L) {
output.writeUInt64(5, lockTtl_);
}
if (forUpdateTs_ != 0L) {
output.writeUInt64(6, forUpdateTs_);
}
if (isFirstLock_ != false) {
output.writeBool(7, isFirstLock_);
}
if (waitTimeout_ != 0L) {
output.writeInt64(8, waitTimeout_);
}
if (force_ != false) {
output.writeBool(9, force_);
}
if (returnValues_ != false) {
output.writeBool(10, returnValues_);
}
if (minCommitTs_ != 0L) {
output.writeUInt64(11, minCommitTs_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (context_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getContext());
}
for (int i = 0; i < mutations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, mutations_.get(i));
}
if (!primaryLock_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, primaryLock_);
}
if (startVersion_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, startVersion_);
}
if (lockTtl_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(5, lockTtl_);
}
if (forUpdateTs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(6, forUpdateTs_);
}
if (isFirstLock_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, isFirstLock_);
}
if (waitTimeout_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(8, waitTimeout_);
}
if (force_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(9, force_);
}
if (returnValues_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(10, returnValues_);
}
if (minCommitTs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(11, minCommitTs_);
}
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.Kvrpcpb.PessimisticLockRequest)) {
return super.equals(obj);
}
org.tikv.kvproto.Kvrpcpb.PessimisticLockRequest other = (org.tikv.kvproto.Kvrpcpb.PessimisticLockRequest) obj;
boolean result = true;
result = result && (hasContext() == other.hasContext());
if (hasContext()) {
result = result && getContext()
.equals(other.getContext());
}
result = result && getMutationsList()
.equals(other.getMutationsList());
result = result && getPrimaryLock()
.equals(other.getPrimaryLock());
result = result && (getStartVersion()
== other.getStartVersion());
result = result && (getLockTtl()
== other.getLockTtl());
result = result && (getForUpdateTs()
== other.getForUpdateTs());
result = result && (getIsFirstLock()
== other.getIsFirstLock());
result = result && (getWaitTimeout()
== other.getWaitTimeout());
result = result && (getForce()
== other.getForce());
result = result && (getReturnValues()
== other.getReturnValues());
result = result && (getMinCommitTs()
== other.getMinCommitTs());
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 (hasContext()) {
hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + getContext().hashCode();
}
if (getMutationsCount() > 0) {
hash = (37 * hash) + MUTATIONS_FIELD_NUMBER;
hash = (53 * hash) + getMutationsList().hashCode();
}
hash = (37 * hash) + PRIMARY_LOCK_FIELD_NUMBER;
hash = (53 * hash) + getPrimaryLock().hashCode();
hash = (37 * hash) + START_VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartVersion());
hash = (37 * hash) + LOCK_TTL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLockTtl());
hash = (37 * hash) + FOR_UPDATE_TS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getForUpdateTs());
hash = (37 * hash) + IS_FIRST_LOCK_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsFirstLock());
hash = (37 * hash) + WAIT_TIMEOUT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getWaitTimeout());
hash = (37 * hash) + FORCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getForce());
hash = (37 * hash) + RETURN_VALUES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getReturnValues());
hash = (37 * hash) + MIN_COMMIT_TS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMinCommitTs());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticLockRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticLockRequest 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.Kvrpcpb.PessimisticLockRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticLockRequest 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.Kvrpcpb.PessimisticLockRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticLockRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticLockRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticLockRequest 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.Kvrpcpb.PessimisticLockRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticLockRequest 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.Kvrpcpb.PessimisticLockRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticLockRequest 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.Kvrpcpb.PessimisticLockRequest 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;
}
/**
*
* Lock a set of keys to prepare to write to them.
*
* Each locking command in a pessimistic transaction has its own timestamp. If locking fails, then
* the corresponding SQL statement can be retried with a later timestamp, TiDB does not need to
* retry the whole transaction. The name comes from the `SELECT ... FOR UPDATE` SQL statement which
* is a locking read. Each `SELECT ... FOR UPDATE` in a transaction will be assigned its own
* timestamp.
*
*
* uint64 for_update_ts = 6;
*/
public long getForUpdateTs() {
return forUpdateTs_;
}
/**
*
* Each locking command in a pessimistic transaction has its own timestamp. If locking fails, then
* the corresponding SQL statement can be retried with a later timestamp, TiDB does not need to
* retry the whole transaction. The name comes from the `SELECT ... FOR UPDATE` SQL statement which
* is a locking read. Each `SELECT ... FOR UPDATE` in a transaction will be assigned its own
* timestamp.
*
* Each locking command in a pessimistic transaction has its own timestamp. If locking fails, then
* the corresponding SQL statement can be retried with a later timestamp, TiDB does not need to
* retry the whole transaction. The name comes from the `SELECT ... FOR UPDATE` SQL statement which
* is a locking read. Each `SELECT ... FOR UPDATE` in a transaction will be assigned its own
* timestamp.
*
* If it is true, TiKV will acquire the pessimistic lock regardless of write conflict
* and return the latest value. It's only supported for single mutation.
*
*
* bool force = 9;
*/
public boolean getForce() {
return force_;
}
/**
*
* If it is true, TiKV will acquire the pessimistic lock regardless of write conflict
* and return the latest value. It's only supported for single mutation.
*
* If it is true, TiKV will acquire the pessimistic lock regardless of write conflict
* and return the latest value. It's only supported for single mutation.
*
* If it is true, TiKV will return values of the keys if no error, so TiDB can cache the values for
* later read in the same transaction.
* When 'force' is set to true, this field is ignored.
*
* If it is true, TiKV will return values of the keys if no error, so TiDB can cache the values for
* later read in the same transaction.
* When 'force' is set to true, this field is ignored.
*
* If it is true, TiKV will return values of the keys if no error, so TiDB can cache the values for
* later read in the same transaction.
* When 'force' is set to true, this field is ignored.
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
*
* repeated bool not_founds = 6;
*/
boolean getNotFounds(int index);
}
/**
* Protobuf type {@code kvrpcpb.PessimisticLockResponse}
*/
public static final class PessimisticLockResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.PessimisticLockResponse)
PessimisticLockResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use PessimisticLockResponse.newBuilder() to construct.
private PessimisticLockResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PessimisticLockResponse() {
errors_ = java.util.Collections.emptyList();
commitTs_ = 0L;
value_ = com.google.protobuf.ByteString.EMPTY;
values_ = java.util.Collections.emptyList();
notFounds_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PessimisticLockResponse(
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.Errorpb.Error.Builder subBuilder = null;
if (regionError_ != null) {
subBuilder = regionError_.toBuilder();
}
regionError_ = input.readMessage(org.tikv.kvproto.Errorpb.Error.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(regionError_);
regionError_ = subBuilder.buildPartial();
}
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
errors_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
errors_.add(
input.readMessage(org.tikv.kvproto.Kvrpcpb.KeyError.parser(), extensionRegistry));
break;
}
case 24: {
commitTs_ = input.readUInt64();
break;
}
case 34: {
value_ = input.readBytes();
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
values_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
values_.add(input.readBytes());
break;
}
case 48: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
notFounds_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
notFounds_.add(input.readBool());
break;
}
case 50: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) {
notFounds_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
while (input.getBytesUntilLimit() > 0) {
notFounds_.add(input.readBool());
}
input.popLimit(limit);
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_ & 0x00000002) == 0x00000002)) {
errors_ = java.util.Collections.unmodifiableList(errors_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
values_ = java.util.Collections.unmodifiableList(values_);
}
if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
notFounds_ = java.util.Collections.unmodifiableList(notFounds_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_PessimisticLockResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_PessimisticLockResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.PessimisticLockResponse.class, org.tikv.kvproto.Kvrpcpb.PessimisticLockResponse.Builder.class);
}
private int bitField0_;
public static final int REGION_ERROR_FIELD_NUMBER = 1;
private org.tikv.kvproto.Errorpb.Error regionError_;
/**
* .errorpb.Error region_error = 1;
*/
public boolean hasRegionError() {
return regionError_ != null;
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.Error getRegionError() {
return regionError_ == null ? org.tikv.kvproto.Errorpb.Error.getDefaultInstance() : regionError_;
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.ErrorOrBuilder getRegionErrorOrBuilder() {
return getRegionError();
}
public static final int ERRORS_FIELD_NUMBER = 2;
private java.util.List errors_;
/**
* repeated .kvrpcpb.KeyError errors = 2;
*/
public java.util.List getErrorsList() {
return errors_;
}
/**
* repeated .kvrpcpb.KeyError errors = 2;
*/
public java.util.List extends org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder>
getErrorsOrBuilderList() {
return errors_;
}
/**
* repeated .kvrpcpb.KeyError errors = 2;
*/
public int getErrorsCount() {
return errors_.size();
}
/**
* repeated .kvrpcpb.KeyError errors = 2;
*/
public org.tikv.kvproto.Kvrpcpb.KeyError getErrors(int index) {
return errors_.get(index);
}
/**
* repeated .kvrpcpb.KeyError errors = 2;
*/
public org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder getErrorsOrBuilder(
int index) {
return errors_.get(index);
}
public static final int COMMIT_TS_FIELD_NUMBER = 3;
private long commitTs_;
/**
*
* It carries the latest value and its commit ts if force in PessimisticLockRequest is true.
*
*
* uint64 commit_ts = 3;
*/
public long getCommitTs() {
return commitTs_;
}
public static final int VALUE_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString value_;
/**
* bytes value = 4;
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
public static final int VALUES_FIELD_NUMBER = 5;
private java.util.List values_;
/**
*
* The values is set if 'return_values' is true in the request and no error.
* If 'force' is true, this field is not used.
*
* The values is set if 'return_values' is true in the request and no error.
* If 'force' is true, this field is not used.
*
*
* repeated bytes values = 5;
*/
public int getValuesCount() {
return values_.size();
}
/**
*
* The values is set if 'return_values' is true in the request and no error.
* If 'force' is true, this field is not used.
*
*
* repeated bytes values = 5;
*/
public com.google.protobuf.ByteString getValues(int index) {
return values_.get(index);
}
public static final int NOT_FOUNDS_FIELD_NUMBER = 6;
private java.util.List notFounds_;
/**
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
*
* repeated bool not_founds = 6;
*/
public int getNotFoundsCount() {
return notFounds_.size();
}
/**
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
*
* repeated bool not_founds = 6;
*/
public int getNotFoundsCount() {
return notFounds_.size();
}
/**
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
* Indicates whether the values at the same index is correspond to an existing key.
* In legacy TiKV, this field is not used even 'force' is false. In that case, an empty value indicates
* two possible situations: (1) the key does not exist. (2) the key exists but the value is empty.
*
*
* repeated bool not_founds = 6;
*/
public Builder clearNotFounds() {
notFounds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
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:kvrpcpb.PessimisticLockResponse)
}
// @@protoc_insertion_point(class_scope:kvrpcpb.PessimisticLockResponse)
private static final org.tikv.kvproto.Kvrpcpb.PessimisticLockResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Kvrpcpb.PessimisticLockResponse();
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticLockResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public PessimisticLockResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PessimisticLockResponse(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.Kvrpcpb.PessimisticLockResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PessimisticRollbackRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:kvrpcpb.PessimisticRollbackRequest)
com.google.protobuf.MessageOrBuilder {
/**
* .kvrpcpb.Context context = 1;
*/
boolean hasContext();
/**
* .kvrpcpb.Context context = 1;
*/
org.tikv.kvproto.Kvrpcpb.Context getContext();
/**
* .kvrpcpb.Context context = 1;
*/
org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder();
/**
* uint64 start_version = 2;
*/
long getStartVersion();
/**
* uint64 for_update_ts = 3;
*/
long getForUpdateTs();
/**
* repeated bytes keys = 4;
*/
java.util.List getKeysList();
/**
* repeated bytes keys = 4;
*/
int getKeysCount();
/**
* repeated bytes keys = 4;
*/
com.google.protobuf.ByteString getKeys(int index);
}
/**
*
* Unlock keys locked using `PessimisticLockRequest`.
*
*
* Protobuf type {@code kvrpcpb.PessimisticRollbackRequest}
*/
public static final class PessimisticRollbackRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.PessimisticRollbackRequest)
PessimisticRollbackRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use PessimisticRollbackRequest.newBuilder() to construct.
private PessimisticRollbackRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PessimisticRollbackRequest() {
startVersion_ = 0L;
forUpdateTs_ = 0L;
keys_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PessimisticRollbackRequest(
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.Kvrpcpb.Context.Builder subBuilder = null;
if (context_ != null) {
subBuilder = context_.toBuilder();
}
context_ = input.readMessage(org.tikv.kvproto.Kvrpcpb.Context.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(context_);
context_ = subBuilder.buildPartial();
}
break;
}
case 16: {
startVersion_ = input.readUInt64();
break;
}
case 24: {
forUpdateTs_ = input.readUInt64();
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
keys_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
keys_.add(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 {
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
keys_ = java.util.Collections.unmodifiableList(keys_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_PessimisticRollbackRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_PessimisticRollbackRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.PessimisticRollbackRequest.class, org.tikv.kvproto.Kvrpcpb.PessimisticRollbackRequest.Builder.class);
}
private int bitField0_;
public static final int CONTEXT_FIELD_NUMBER = 1;
private org.tikv.kvproto.Kvrpcpb.Context context_;
/**
* .kvrpcpb.Context context = 1;
*/
public boolean hasContext() {
return context_ != null;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.Context getContext() {
return context_ == null ? org.tikv.kvproto.Kvrpcpb.Context.getDefaultInstance() : context_;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder() {
return getContext();
}
public static final int START_VERSION_FIELD_NUMBER = 2;
private long startVersion_;
/**
* uint64 start_version = 2;
*/
public long getStartVersion() {
return startVersion_;
}
public static final int FOR_UPDATE_TS_FIELD_NUMBER = 3;
private long forUpdateTs_;
/**
* uint64 for_update_ts = 3;
*/
public long getForUpdateTs() {
return forUpdateTs_;
}
public static final int KEYS_FIELD_NUMBER = 4;
private java.util.List keys_;
/**
* repeated bytes keys = 4;
*/
public java.util.List
getKeysList() {
return keys_;
}
/**
* repeated bytes keys = 4;
*/
public int getKeysCount() {
return keys_.size();
}
/**
* repeated bytes keys = 4;
*/
public com.google.protobuf.ByteString getKeys(int index) {
return keys_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (context_ != null) {
output.writeMessage(1, getContext());
}
if (startVersion_ != 0L) {
output.writeUInt64(2, startVersion_);
}
if (forUpdateTs_ != 0L) {
output.writeUInt64(3, forUpdateTs_);
}
for (int i = 0; i < keys_.size(); i++) {
output.writeBytes(4, keys_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (context_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getContext());
}
if (startVersion_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, startVersion_);
}
if (forUpdateTs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, forUpdateTs_);
}
{
int dataSize = 0;
for (int i = 0; i < keys_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(keys_.get(i));
}
size += dataSize;
size += 1 * getKeysList().size();
}
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.Kvrpcpb.PessimisticRollbackRequest)) {
return super.equals(obj);
}
org.tikv.kvproto.Kvrpcpb.PessimisticRollbackRequest other = (org.tikv.kvproto.Kvrpcpb.PessimisticRollbackRequest) obj;
boolean result = true;
result = result && (hasContext() == other.hasContext());
if (hasContext()) {
result = result && getContext()
.equals(other.getContext());
}
result = result && (getStartVersion()
== other.getStartVersion());
result = result && (getForUpdateTs()
== other.getForUpdateTs());
result = result && getKeysList()
.equals(other.getKeysList());
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 (hasContext()) {
hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + getContext().hashCode();
}
hash = (37 * hash) + START_VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartVersion());
hash = (37 * hash) + FOR_UPDATE_TS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getForUpdateTs());
if (getKeysCount() > 0) {
hash = (37 * hash) + KEYS_FIELD_NUMBER;
hash = (53 * hash) + getKeysList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticRollbackRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticRollbackRequest 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.Kvrpcpb.PessimisticRollbackRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticRollbackRequest 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.Kvrpcpb.PessimisticRollbackRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticRollbackRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticRollbackRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticRollbackRequest 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.Kvrpcpb.PessimisticRollbackRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticRollbackRequest 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.Kvrpcpb.PessimisticRollbackRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.PessimisticRollbackRequest 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.Kvrpcpb.PessimisticRollbackRequest 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;
}
/**
*
* Unlock keys locked using `PessimisticLockRequest`.
*
* Used to update the lock_ttl of a psessimistic and/or large transaction to prevent it from been killed.
*
*
* Protobuf type {@code kvrpcpb.TxnHeartBeatRequest}
*/
public static final class TxnHeartBeatRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.TxnHeartBeatRequest)
TxnHeartBeatRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use TxnHeartBeatRequest.newBuilder() to construct.
private TxnHeartBeatRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TxnHeartBeatRequest() {
primaryLock_ = com.google.protobuf.ByteString.EMPTY;
startVersion_ = 0L;
adviseLockTtl_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TxnHeartBeatRequest(
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.Kvrpcpb.Context.Builder subBuilder = null;
if (context_ != null) {
subBuilder = context_.toBuilder();
}
context_ = input.readMessage(org.tikv.kvproto.Kvrpcpb.Context.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(context_);
context_ = subBuilder.buildPartial();
}
break;
}
case 18: {
primaryLock_ = input.readBytes();
break;
}
case 24: {
startVersion_ = input.readUInt64();
break;
}
case 32: {
adviseLockTtl_ = 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.Kvrpcpb.internal_static_kvrpcpb_TxnHeartBeatRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_TxnHeartBeatRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.TxnHeartBeatRequest.class, org.tikv.kvproto.Kvrpcpb.TxnHeartBeatRequest.Builder.class);
}
public static final int CONTEXT_FIELD_NUMBER = 1;
private org.tikv.kvproto.Kvrpcpb.Context context_;
/**
* .kvrpcpb.Context context = 1;
*/
public boolean hasContext() {
return context_ != null;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.Context getContext() {
return context_ == null ? org.tikv.kvproto.Kvrpcpb.Context.getDefaultInstance() : context_;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder() {
return getContext();
}
public static final int PRIMARY_LOCK_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString primaryLock_;
/**
*
* The key of the lock to update.
*
*
* bytes primary_lock = 2;
*/
public com.google.protobuf.ByteString getPrimaryLock() {
return primaryLock_;
}
public static final int START_VERSION_FIELD_NUMBER = 3;
private long startVersion_;
/**
*
* Start timestamp of the large transaction.
*
*
* uint64 start_version = 3;
*/
public long getStartVersion() {
return startVersion_;
}
public static final int ADVISE_LOCK_TTL_FIELD_NUMBER = 4;
private long adviseLockTtl_;
/**
*
* The new TTL the sender would like.
*
*
* uint64 advise_lock_ttl = 4;
*/
public long getAdviseLockTtl() {
return adviseLockTtl_;
}
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 (context_ != null) {
output.writeMessage(1, getContext());
}
if (!primaryLock_.isEmpty()) {
output.writeBytes(2, primaryLock_);
}
if (startVersion_ != 0L) {
output.writeUInt64(3, startVersion_);
}
if (adviseLockTtl_ != 0L) {
output.writeUInt64(4, adviseLockTtl_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (context_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getContext());
}
if (!primaryLock_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, primaryLock_);
}
if (startVersion_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, startVersion_);
}
if (adviseLockTtl_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, adviseLockTtl_);
}
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.Kvrpcpb.TxnHeartBeatRequest)) {
return super.equals(obj);
}
org.tikv.kvproto.Kvrpcpb.TxnHeartBeatRequest other = (org.tikv.kvproto.Kvrpcpb.TxnHeartBeatRequest) obj;
boolean result = true;
result = result && (hasContext() == other.hasContext());
if (hasContext()) {
result = result && getContext()
.equals(other.getContext());
}
result = result && getPrimaryLock()
.equals(other.getPrimaryLock());
result = result && (getStartVersion()
== other.getStartVersion());
result = result && (getAdviseLockTtl()
== other.getAdviseLockTtl());
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 (hasContext()) {
hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + getContext().hashCode();
}
hash = (37 * hash) + PRIMARY_LOCK_FIELD_NUMBER;
hash = (53 * hash) + getPrimaryLock().hashCode();
hash = (37 * hash) + START_VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartVersion());
hash = (37 * hash) + ADVISE_LOCK_TTL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getAdviseLockTtl());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Kvrpcpb.TxnHeartBeatRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.TxnHeartBeatRequest 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.Kvrpcpb.TxnHeartBeatRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.TxnHeartBeatRequest 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.Kvrpcpb.TxnHeartBeatRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.TxnHeartBeatRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Kvrpcpb.TxnHeartBeatRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.TxnHeartBeatRequest 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.Kvrpcpb.TxnHeartBeatRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.TxnHeartBeatRequest 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.Kvrpcpb.TxnHeartBeatRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.TxnHeartBeatRequest 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.Kvrpcpb.TxnHeartBeatRequest 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;
}
/**
*
* Used to update the lock_ttl of a psessimistic and/or large transaction to prevent it from been killed.
*
* This field is set to true only if the transaction is known to fall back from async commit.
* Then, CheckTxnStatus treats the transaction as non-async-commit even if the use_async_commit
* field in the primary lock is true.
*
* If the check request is used to resolve or decide the transaction status for a input pessimistic
* lock, the transaction status could not be decided if the primary lock is pessimistic too and
* it's still uncertain.
*
* CheckTxnStatusRequest checks the status of a transaction.
* If the transaction is rollbacked/committed, return that result.
* If the TTL of the transaction is exhausted, abort that transaction and inform the caller.
* Otherwise, returns the TTL information for the transaction.
* CheckTxnStatusRequest may also push forward the minCommitTS of a large transaction.
*
*
* Protobuf type {@code kvrpcpb.CheckTxnStatusRequest}
*/
public static final class CheckTxnStatusRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.CheckTxnStatusRequest)
CheckTxnStatusRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use CheckTxnStatusRequest.newBuilder() to construct.
private CheckTxnStatusRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CheckTxnStatusRequest() {
primaryKey_ = com.google.protobuf.ByteString.EMPTY;
lockTs_ = 0L;
callerStartTs_ = 0L;
currentTs_ = 0L;
rollbackIfNotExist_ = false;
forceSyncCommit_ = false;
resolvingPessimisticLock_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CheckTxnStatusRequest(
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.Kvrpcpb.Context.Builder subBuilder = null;
if (context_ != null) {
subBuilder = context_.toBuilder();
}
context_ = input.readMessage(org.tikv.kvproto.Kvrpcpb.Context.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(context_);
context_ = subBuilder.buildPartial();
}
break;
}
case 18: {
primaryKey_ = input.readBytes();
break;
}
case 24: {
lockTs_ = input.readUInt64();
break;
}
case 32: {
callerStartTs_ = input.readUInt64();
break;
}
case 40: {
currentTs_ = input.readUInt64();
break;
}
case 48: {
rollbackIfNotExist_ = input.readBool();
break;
}
case 56: {
forceSyncCommit_ = input.readBool();
break;
}
case 64: {
resolvingPessimisticLock_ = input.readBool();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_CheckTxnStatusRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_CheckTxnStatusRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest.class, org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest.Builder.class);
}
public static final int CONTEXT_FIELD_NUMBER = 1;
private org.tikv.kvproto.Kvrpcpb.Context context_;
/**
* .kvrpcpb.Context context = 1;
*/
public boolean hasContext() {
return context_ != null;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.Context getContext() {
return context_ == null ? org.tikv.kvproto.Kvrpcpb.Context.getDefaultInstance() : context_;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder() {
return getContext();
}
public static final int PRIMARY_KEY_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString primaryKey_;
/**
*
* Primary key and lock ts together to locate the primary lock of a transaction.
*
*
* bytes primary_key = 2;
*/
public com.google.protobuf.ByteString getPrimaryKey() {
return primaryKey_;
}
public static final int LOCK_TS_FIELD_NUMBER = 3;
private long lockTs_;
/**
*
* Starting timestamp of the transaction being checked.
*
*
* uint64 lock_ts = 3;
*/
public long getLockTs() {
return lockTs_;
}
public static final int CALLER_START_TS_FIELD_NUMBER = 4;
private long callerStartTs_;
/**
*
* The start timestamp of the transaction which this request is part of.
*
*
* uint64 caller_start_ts = 4;
*/
public long getCallerStartTs() {
return callerStartTs_;
}
public static final int CURRENT_TS_FIELD_NUMBER = 5;
private long currentTs_;
/**
*
* The client must specify the current time to TiKV using this timestamp. It is used to check TTL
* timeouts. It may be inaccurate.
*
*
* uint64 current_ts = 5;
*/
public long getCurrentTs() {
return currentTs_;
}
public static final int ROLLBACK_IF_NOT_EXIST_FIELD_NUMBER = 6;
private boolean rollbackIfNotExist_;
/**
*
* If true, then TiKV will leave a rollback tombstone in the write CF for `primary_key`, even if
* that key is not locked.
*
*
* bool rollback_if_not_exist = 6;
*/
public boolean getRollbackIfNotExist() {
return rollbackIfNotExist_;
}
public static final int FORCE_SYNC_COMMIT_FIELD_NUMBER = 7;
private boolean forceSyncCommit_;
/**
*
* This field is set to true only if the transaction is known to fall back from async commit.
* Then, CheckTxnStatus treats the transaction as non-async-commit even if the use_async_commit
* field in the primary lock is true.
*
*
* bool force_sync_commit = 7;
*/
public boolean getForceSyncCommit() {
return forceSyncCommit_;
}
public static final int RESOLVING_PESSIMISTIC_LOCK_FIELD_NUMBER = 8;
private boolean resolvingPessimisticLock_;
/**
*
* If the check request is used to resolve or decide the transaction status for a input pessimistic
* lock, the transaction status could not be decided if the primary lock is pessimistic too and
* it's still uncertain.
*
*
* bool resolving_pessimistic_lock = 8;
*/
public boolean getResolvingPessimisticLock() {
return resolvingPessimisticLock_;
}
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 (context_ != null) {
output.writeMessage(1, getContext());
}
if (!primaryKey_.isEmpty()) {
output.writeBytes(2, primaryKey_);
}
if (lockTs_ != 0L) {
output.writeUInt64(3, lockTs_);
}
if (callerStartTs_ != 0L) {
output.writeUInt64(4, callerStartTs_);
}
if (currentTs_ != 0L) {
output.writeUInt64(5, currentTs_);
}
if (rollbackIfNotExist_ != false) {
output.writeBool(6, rollbackIfNotExist_);
}
if (forceSyncCommit_ != false) {
output.writeBool(7, forceSyncCommit_);
}
if (resolvingPessimisticLock_ != false) {
output.writeBool(8, resolvingPessimisticLock_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (context_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getContext());
}
if (!primaryKey_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, primaryKey_);
}
if (lockTs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, lockTs_);
}
if (callerStartTs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, callerStartTs_);
}
if (currentTs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(5, currentTs_);
}
if (rollbackIfNotExist_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, rollbackIfNotExist_);
}
if (forceSyncCommit_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, forceSyncCommit_);
}
if (resolvingPessimisticLock_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(8, resolvingPessimisticLock_);
}
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.Kvrpcpb.CheckTxnStatusRequest)) {
return super.equals(obj);
}
org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest other = (org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest) obj;
boolean result = true;
result = result && (hasContext() == other.hasContext());
if (hasContext()) {
result = result && getContext()
.equals(other.getContext());
}
result = result && getPrimaryKey()
.equals(other.getPrimaryKey());
result = result && (getLockTs()
== other.getLockTs());
result = result && (getCallerStartTs()
== other.getCallerStartTs());
result = result && (getCurrentTs()
== other.getCurrentTs());
result = result && (getRollbackIfNotExist()
== other.getRollbackIfNotExist());
result = result && (getForceSyncCommit()
== other.getForceSyncCommit());
result = result && (getResolvingPessimisticLock()
== other.getResolvingPessimisticLock());
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 (hasContext()) {
hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + getContext().hashCode();
}
hash = (37 * hash) + PRIMARY_KEY_FIELD_NUMBER;
hash = (53 * hash) + getPrimaryKey().hashCode();
hash = (37 * hash) + LOCK_TS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLockTs());
hash = (37 * hash) + CALLER_START_TS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCallerStartTs());
hash = (37 * hash) + CURRENT_TS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCurrentTs());
hash = (37 * hash) + ROLLBACK_IF_NOT_EXIST_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getRollbackIfNotExist());
hash = (37 * hash) + FORCE_SYNC_COMMIT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getForceSyncCommit());
hash = (37 * hash) + RESOLVING_PESSIMISTIC_LOCK_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getResolvingPessimisticLock());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest 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.Kvrpcpb.CheckTxnStatusRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest 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.Kvrpcpb.CheckTxnStatusRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest 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.Kvrpcpb.CheckTxnStatusRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest 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.Kvrpcpb.CheckTxnStatusRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest 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.Kvrpcpb.CheckTxnStatusRequest 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;
}
/**
*
* CheckTxnStatusRequest checks the status of a transaction.
* If the transaction is rollbacked/committed, return that result.
* If the TTL of the transaction is exhausted, abort that transaction and inform the caller.
* Otherwise, returns the TTL information for the transaction.
* CheckTxnStatusRequest may also push forward the minCommitTS of a large transaction.
*
* This field is set to true only if the transaction is known to fall back from async commit.
* Then, CheckTxnStatus treats the transaction as non-async-commit even if the use_async_commit
* field in the primary lock is true.
*
* This field is set to true only if the transaction is known to fall back from async commit.
* Then, CheckTxnStatus treats the transaction as non-async-commit even if the use_async_commit
* field in the primary lock is true.
*
* This field is set to true only if the transaction is known to fall back from async commit.
* Then, CheckTxnStatus treats the transaction as non-async-commit even if the use_async_commit
* field in the primary lock is true.
*
* If the check request is used to resolve or decide the transaction status for a input pessimistic
* lock, the transaction status could not be decided if the primary lock is pessimistic too and
* it's still uncertain.
*
* If the check request is used to resolve or decide the transaction status for a input pessimistic
* lock, the transaction status could not be decided if the primary lock is pessimistic too and
* it's still uncertain.
*
* If the check request is used to resolve or decide the transaction status for a input pessimistic
* lock, the transaction status could not be decided if the primary lock is pessimistic too and
* it's still uncertain.
*
*
* bool resolving_pessimistic_lock = 8;
*/
public Builder clearResolvingPessimisticLock() {
resolvingPessimisticLock_ = 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:kvrpcpb.CheckTxnStatusRequest)
}
// @@protoc_insertion_point(class_scope:kvrpcpb.CheckTxnStatusRequest)
private static final org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest();
}
public static org.tikv.kvproto.Kvrpcpb.CheckTxnStatusRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public CheckTxnStatusRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CheckTxnStatusRequest(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.Kvrpcpb.CheckTxnStatusRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CheckTxnStatusResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:kvrpcpb.CheckTxnStatusResponse)
com.google.protobuf.MessageOrBuilder {
/**
* .errorpb.Error region_error = 1;
*/
boolean hasRegionError();
/**
* .errorpb.Error region_error = 1;
*/
org.tikv.kvproto.Errorpb.Error getRegionError();
/**
* .errorpb.Error region_error = 1;
*/
org.tikv.kvproto.Errorpb.ErrorOrBuilder getRegionErrorOrBuilder();
/**
* .kvrpcpb.KeyError error = 2;
*/
boolean hasError();
/**
* .kvrpcpb.KeyError error = 2;
*/
org.tikv.kvproto.Kvrpcpb.KeyError getError();
/**
* .kvrpcpb.KeyError error = 2;
*/
org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder getErrorOrBuilder();
/**
*
*
* uint64 lock_ttl = 3;
*/
public long getLockTtl() {
return lockTtl_;
}
public static final int COMMIT_VERSION_FIELD_NUMBER = 4;
private long commitVersion_;
/**
* uint64 commit_version = 4;
*/
public long getCommitVersion() {
return commitVersion_;
}
public static final int ACTION_FIELD_NUMBER = 5;
private int action_;
/**
*
* The action performed by TiKV (and why if the action is to rollback).
*
*
* .kvrpcpb.Action action = 5;
*/
public int getActionValue() {
return action_;
}
/**
*
* The action performed by TiKV (and why if the action is to rollback).
*
* Part of the async commit protocol, checks for locks on all supplied keys. If a lock is missing,
* does not have a successful status, or belongs to another transaction, TiKV will leave a rollback
* tombstone for that key.
*
*
* Protobuf type {@code kvrpcpb.CheckSecondaryLocksRequest}
*/
public static final class CheckSecondaryLocksRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.CheckSecondaryLocksRequest)
CheckSecondaryLocksRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use CheckSecondaryLocksRequest.newBuilder() to construct.
private CheckSecondaryLocksRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CheckSecondaryLocksRequest() {
keys_ = java.util.Collections.emptyList();
startVersion_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CheckSecondaryLocksRequest(
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.Kvrpcpb.Context.Builder subBuilder = null;
if (context_ != null) {
subBuilder = context_.toBuilder();
}
context_ = input.readMessage(org.tikv.kvproto.Kvrpcpb.Context.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(context_);
context_ = subBuilder.buildPartial();
}
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
keys_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
keys_.add(input.readBytes());
break;
}
case 24: {
startVersion_ = 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 {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
keys_ = java.util.Collections.unmodifiableList(keys_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_CheckSecondaryLocksRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_CheckSecondaryLocksRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest.class, org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest.Builder.class);
}
private int bitField0_;
public static final int CONTEXT_FIELD_NUMBER = 1;
private org.tikv.kvproto.Kvrpcpb.Context context_;
/**
* .kvrpcpb.Context context = 1;
*/
public boolean hasContext() {
return context_ != null;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.Context getContext() {
return context_ == null ? org.tikv.kvproto.Kvrpcpb.Context.getDefaultInstance() : context_;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder() {
return getContext();
}
public static final int KEYS_FIELD_NUMBER = 2;
private java.util.List keys_;
/**
* repeated bytes keys = 2;
*/
public java.util.List
getKeysList() {
return keys_;
}
/**
* repeated bytes keys = 2;
*/
public int getKeysCount() {
return keys_.size();
}
/**
* repeated bytes keys = 2;
*/
public com.google.protobuf.ByteString getKeys(int index) {
return keys_.get(index);
}
public static final int START_VERSION_FIELD_NUMBER = 3;
private long startVersion_;
/**
*
* Identifies the transaction we are investigating.
*
*
* uint64 start_version = 3;
*/
public long getStartVersion() {
return startVersion_;
}
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 (context_ != null) {
output.writeMessage(1, getContext());
}
for (int i = 0; i < keys_.size(); i++) {
output.writeBytes(2, keys_.get(i));
}
if (startVersion_ != 0L) {
output.writeUInt64(3, startVersion_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (context_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getContext());
}
{
int dataSize = 0;
for (int i = 0; i < keys_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(keys_.get(i));
}
size += dataSize;
size += 1 * getKeysList().size();
}
if (startVersion_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, startVersion_);
}
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.Kvrpcpb.CheckSecondaryLocksRequest)) {
return super.equals(obj);
}
org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest other = (org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest) obj;
boolean result = true;
result = result && (hasContext() == other.hasContext());
if (hasContext()) {
result = result && getContext()
.equals(other.getContext());
}
result = result && getKeysList()
.equals(other.getKeysList());
result = result && (getStartVersion()
== other.getStartVersion());
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 (hasContext()) {
hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + getContext().hashCode();
}
if (getKeysCount() > 0) {
hash = (37 * hash) + KEYS_FIELD_NUMBER;
hash = (53 * hash) + getKeysList().hashCode();
}
hash = (37 * hash) + START_VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartVersion());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest 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.Kvrpcpb.CheckSecondaryLocksRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest 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.Kvrpcpb.CheckSecondaryLocksRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest 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.Kvrpcpb.CheckSecondaryLocksRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest 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.Kvrpcpb.CheckSecondaryLocksRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest 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.Kvrpcpb.CheckSecondaryLocksRequest 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;
}
/**
*
* Part of the async commit protocol, checks for locks on all supplied keys. If a lock is missing,
* does not have a successful status, or belongs to another transaction, TiKV will leave a rollback
* tombstone for that key.
*
* Identifies the transaction we are investigating.
*
*
* uint64 start_version = 3;
*/
public Builder clearStartVersion() {
startVersion_ = 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:kvrpcpb.CheckSecondaryLocksRequest)
}
// @@protoc_insertion_point(class_scope:kvrpcpb.CheckSecondaryLocksRequest)
private static final org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest();
}
public static org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public CheckSecondaryLocksRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CheckSecondaryLocksRequest(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.Kvrpcpb.CheckSecondaryLocksRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CheckSecondaryLocksResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:kvrpcpb.CheckSecondaryLocksResponse)
com.google.protobuf.MessageOrBuilder {
/**
* .errorpb.Error region_error = 1;
*/
boolean hasRegionError();
/**
* .errorpb.Error region_error = 1;
*/
org.tikv.kvproto.Errorpb.Error getRegionError();
/**
* .errorpb.Error region_error = 1;
*/
org.tikv.kvproto.Errorpb.ErrorOrBuilder getRegionErrorOrBuilder();
/**
* .kvrpcpb.KeyError error = 2;
*/
boolean hasError();
/**
* .kvrpcpb.KeyError error = 2;
*/
org.tikv.kvproto.Kvrpcpb.KeyError getError();
/**
* .kvrpcpb.KeyError error = 2;
*/
org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder getErrorOrBuilder();
/**
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* If any of the locks have been committed, this is the commit ts used. If no
* locks have been committed, it will be zero.
*
*
* uint64 commit_ts = 4;
*/
long getCommitTs();
}
/**
* Protobuf type {@code kvrpcpb.CheckSecondaryLocksResponse}
*/
public static final class CheckSecondaryLocksResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.CheckSecondaryLocksResponse)
CheckSecondaryLocksResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use CheckSecondaryLocksResponse.newBuilder() to construct.
private CheckSecondaryLocksResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CheckSecondaryLocksResponse() {
locks_ = java.util.Collections.emptyList();
commitTs_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CheckSecondaryLocksResponse(
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.Errorpb.Error.Builder subBuilder = null;
if (regionError_ != null) {
subBuilder = regionError_.toBuilder();
}
regionError_ = input.readMessage(org.tikv.kvproto.Errorpb.Error.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(regionError_);
regionError_ = subBuilder.buildPartial();
}
break;
}
case 18: {
org.tikv.kvproto.Kvrpcpb.KeyError.Builder subBuilder = null;
if (error_ != null) {
subBuilder = error_.toBuilder();
}
error_ = input.readMessage(org.tikv.kvproto.Kvrpcpb.KeyError.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(error_);
error_ = subBuilder.buildPartial();
}
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
locks_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
locks_.add(
input.readMessage(org.tikv.kvproto.Kvrpcpb.LockInfo.parser(), extensionRegistry));
break;
}
case 32: {
commitTs_ = 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 {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
locks_ = java.util.Collections.unmodifiableList(locks_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_CheckSecondaryLocksResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_CheckSecondaryLocksResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksResponse.class, org.tikv.kvproto.Kvrpcpb.CheckSecondaryLocksResponse.Builder.class);
}
private int bitField0_;
public static final int REGION_ERROR_FIELD_NUMBER = 1;
private org.tikv.kvproto.Errorpb.Error regionError_;
/**
* .errorpb.Error region_error = 1;
*/
public boolean hasRegionError() {
return regionError_ != null;
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.Error getRegionError() {
return regionError_ == null ? org.tikv.kvproto.Errorpb.Error.getDefaultInstance() : regionError_;
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.ErrorOrBuilder getRegionErrorOrBuilder() {
return getRegionError();
}
public static final int ERROR_FIELD_NUMBER = 2;
private org.tikv.kvproto.Kvrpcpb.KeyError error_;
/**
* .kvrpcpb.KeyError error = 2;
*/
public boolean hasError() {
return error_ != null;
}
/**
* .kvrpcpb.KeyError error = 2;
*/
public org.tikv.kvproto.Kvrpcpb.KeyError getError() {
return error_ == null ? org.tikv.kvproto.Kvrpcpb.KeyError.getDefaultInstance() : error_;
}
/**
* .kvrpcpb.KeyError error = 2;
*/
public org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder getErrorOrBuilder() {
return getError();
}
public static final int LOCKS_FIELD_NUMBER = 3;
private java.util.List locks_;
/**
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
*
* repeated .kvrpcpb.LockInfo locks = 3;
*/
public int getLocksCount() {
return locks_.size();
}
/**
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
*
* repeated .kvrpcpb.LockInfo locks = 3;
*/
public org.tikv.kvproto.Kvrpcpb.LockInfoOrBuilder getLocksOrBuilder(
int index) {
return locks_.get(index);
}
public static final int COMMIT_TS_FIELD_NUMBER = 4;
private long commitTs_;
/**
*
* If any of the locks have been committed, this is the commit ts used. If no
* locks have been committed, it will be zero.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
*
* repeated .kvrpcpb.LockInfo locks = 3;
*/
public int getLocksCount() {
if (locksBuilder_ == null) {
return locks_.size();
} else {
return locksBuilder_.getCount();
}
}
/**
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
*
* repeated .kvrpcpb.LockInfo locks = 3;
*/
public Builder setLocks(
int index, org.tikv.kvproto.Kvrpcpb.LockInfo value) {
if (locksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLocksIsMutable();
locks_.set(index, value);
onChanged();
} else {
locksBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
*
* repeated .kvrpcpb.LockInfo locks = 3;
*/
public Builder addLocks(org.tikv.kvproto.Kvrpcpb.LockInfo value) {
if (locksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLocksIsMutable();
locks_.add(value);
onChanged();
} else {
locksBuilder_.addMessage(value);
}
return this;
}
/**
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
*
* repeated .kvrpcpb.LockInfo locks = 3;
*/
public Builder addLocks(
int index, org.tikv.kvproto.Kvrpcpb.LockInfo value) {
if (locksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLocksIsMutable();
locks_.add(index, value);
onChanged();
} else {
locksBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
*
* repeated .kvrpcpb.LockInfo locks = 3;
*/
public org.tikv.kvproto.Kvrpcpb.LockInfo.Builder getLocksBuilder(
int index) {
return getLocksFieldBuilder().getBuilder(index);
}
/**
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
*
* repeated .kvrpcpb.LockInfo locks = 3;
*/
public org.tikv.kvproto.Kvrpcpb.LockInfoOrBuilder getLocksOrBuilder(
int index) {
if (locksBuilder_ == null) {
return locks_.get(index); } else {
return locksBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* For each key in `keys` in `CheckSecondaryLocks`, there will be a lock in
* this list if there is a lock present and belonging to the correct transaction,
* nil otherwise.
*
* The second phase of writing to TiKV. If there are no errors or conflicts, then this request
* commits a transaction so that its data can be read by other transactions.
*
*
* Protobuf type {@code kvrpcpb.CommitRequest}
*/
public static final class CommitRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.CommitRequest)
CommitRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use CommitRequest.newBuilder() to construct.
private CommitRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CommitRequest() {
startVersion_ = 0L;
keys_ = java.util.Collections.emptyList();
commitVersion_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CommitRequest(
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.Kvrpcpb.Context.Builder subBuilder = null;
if (context_ != null) {
subBuilder = context_.toBuilder();
}
context_ = input.readMessage(org.tikv.kvproto.Kvrpcpb.Context.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(context_);
context_ = subBuilder.buildPartial();
}
break;
}
case 16: {
startVersion_ = input.readUInt64();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
keys_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
keys_.add(input.readBytes());
break;
}
case 32: {
commitVersion_ = 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 {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
keys_ = java.util.Collections.unmodifiableList(keys_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_CommitRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_CommitRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.CommitRequest.class, org.tikv.kvproto.Kvrpcpb.CommitRequest.Builder.class);
}
private int bitField0_;
public static final int CONTEXT_FIELD_NUMBER = 1;
private org.tikv.kvproto.Kvrpcpb.Context context_;
/**
* .kvrpcpb.Context context = 1;
*/
public boolean hasContext() {
return context_ != null;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.Context getContext() {
return context_ == null ? org.tikv.kvproto.Kvrpcpb.Context.getDefaultInstance() : context_;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder() {
return getContext();
}
public static final int START_VERSION_FIELD_NUMBER = 2;
private long startVersion_;
/**
*
* Identifies the transaction.
*
*
* uint64 start_version = 2;
*/
public long getStartVersion() {
return startVersion_;
}
public static final int KEYS_FIELD_NUMBER = 3;
private java.util.List keys_;
/**
*
* All keys in the transaction (to be committed).
*
* All keys in the transaction (to be committed).
*
*
* repeated bytes keys = 3;
*/
public int getKeysCount() {
return keys_.size();
}
/**
*
* All keys in the transaction (to be committed).
*
*
* repeated bytes keys = 3;
*/
public com.google.protobuf.ByteString getKeys(int index) {
return keys_.get(index);
}
public static final int COMMIT_VERSION_FIELD_NUMBER = 4;
private long commitVersion_;
/**
*
* Timestamp for the end of the transaction. Must be greater than `start_version`.
*
*
* uint64 commit_version = 4;
*/
public long getCommitVersion() {
return commitVersion_;
}
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 (context_ != null) {
output.writeMessage(1, getContext());
}
if (startVersion_ != 0L) {
output.writeUInt64(2, startVersion_);
}
for (int i = 0; i < keys_.size(); i++) {
output.writeBytes(3, keys_.get(i));
}
if (commitVersion_ != 0L) {
output.writeUInt64(4, commitVersion_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (context_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getContext());
}
if (startVersion_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, startVersion_);
}
{
int dataSize = 0;
for (int i = 0; i < keys_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(keys_.get(i));
}
size += dataSize;
size += 1 * getKeysList().size();
}
if (commitVersion_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, commitVersion_);
}
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.Kvrpcpb.CommitRequest)) {
return super.equals(obj);
}
org.tikv.kvproto.Kvrpcpb.CommitRequest other = (org.tikv.kvproto.Kvrpcpb.CommitRequest) obj;
boolean result = true;
result = result && (hasContext() == other.hasContext());
if (hasContext()) {
result = result && getContext()
.equals(other.getContext());
}
result = result && (getStartVersion()
== other.getStartVersion());
result = result && getKeysList()
.equals(other.getKeysList());
result = result && (getCommitVersion()
== other.getCommitVersion());
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 (hasContext()) {
hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + getContext().hashCode();
}
hash = (37 * hash) + START_VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartVersion());
if (getKeysCount() > 0) {
hash = (37 * hash) + KEYS_FIELD_NUMBER;
hash = (53 * hash) + getKeysList().hashCode();
}
hash = (37 * hash) + COMMIT_VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCommitVersion());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Kvrpcpb.CommitRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.CommitRequest 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.Kvrpcpb.CommitRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.CommitRequest 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.Kvrpcpb.CommitRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.CommitRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Kvrpcpb.CommitRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.CommitRequest 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.Kvrpcpb.CommitRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.CommitRequest 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.Kvrpcpb.CommitRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.CommitRequest 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.Kvrpcpb.CommitRequest 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;
}
/**
*
* The second phase of writing to TiKV. If there are no errors or conflicts, then this request
* commits a transaction so that its data can be read by other transactions.
*
* The current timestamp, used in combination with a lock's TTL to determine
* if the lock has expired. If `current_ts == 0`, then the key will be unlocked
* irrespective of its TTL.
*
* Cleanup a key by possibly unlocking it.
* From 4.0 onwards, this message is no longer used.
*
*
* Protobuf type {@code kvrpcpb.CleanupRequest}
*/
public static final class CleanupRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.CleanupRequest)
CleanupRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use CleanupRequest.newBuilder() to construct.
private CleanupRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CleanupRequest() {
key_ = com.google.protobuf.ByteString.EMPTY;
startVersion_ = 0L;
currentTs_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CleanupRequest(
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.Kvrpcpb.Context.Builder subBuilder = null;
if (context_ != null) {
subBuilder = context_.toBuilder();
}
context_ = input.readMessage(org.tikv.kvproto.Kvrpcpb.Context.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(context_);
context_ = subBuilder.buildPartial();
}
break;
}
case 18: {
key_ = input.readBytes();
break;
}
case 24: {
startVersion_ = input.readUInt64();
break;
}
case 32: {
currentTs_ = 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.Kvrpcpb.internal_static_kvrpcpb_CleanupRequest_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_CleanupRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.CleanupRequest.class, org.tikv.kvproto.Kvrpcpb.CleanupRequest.Builder.class);
}
public static final int CONTEXT_FIELD_NUMBER = 1;
private org.tikv.kvproto.Kvrpcpb.Context context_;
/**
* .kvrpcpb.Context context = 1;
*/
public boolean hasContext() {
return context_ != null;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.Context getContext() {
return context_ == null ? org.tikv.kvproto.Kvrpcpb.Context.getDefaultInstance() : context_;
}
/**
* .kvrpcpb.Context context = 1;
*/
public org.tikv.kvproto.Kvrpcpb.ContextOrBuilder getContextOrBuilder() {
return getContext();
}
public static final int KEY_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString key_;
/**
* bytes key = 2;
*/
public com.google.protobuf.ByteString getKey() {
return key_;
}
public static final int START_VERSION_FIELD_NUMBER = 3;
private long startVersion_;
/**
* uint64 start_version = 3;
*/
public long getStartVersion() {
return startVersion_;
}
public static final int CURRENT_TS_FIELD_NUMBER = 4;
private long currentTs_;
/**
*
* The current timestamp, used in combination with a lock's TTL to determine
* if the lock has expired. If `current_ts == 0`, then the key will be unlocked
* irrespective of its TTL.
*
*
* uint64 current_ts = 4;
*/
public long getCurrentTs() {
return currentTs_;
}
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 (context_ != null) {
output.writeMessage(1, getContext());
}
if (!key_.isEmpty()) {
output.writeBytes(2, key_);
}
if (startVersion_ != 0L) {
output.writeUInt64(3, startVersion_);
}
if (currentTs_ != 0L) {
output.writeUInt64(4, currentTs_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (context_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getContext());
}
if (!key_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, key_);
}
if (startVersion_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(3, startVersion_);
}
if (currentTs_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, currentTs_);
}
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.Kvrpcpb.CleanupRequest)) {
return super.equals(obj);
}
org.tikv.kvproto.Kvrpcpb.CleanupRequest other = (org.tikv.kvproto.Kvrpcpb.CleanupRequest) obj;
boolean result = true;
result = result && (hasContext() == other.hasContext());
if (hasContext()) {
result = result && getContext()
.equals(other.getContext());
}
result = result && getKey()
.equals(other.getKey());
result = result && (getStartVersion()
== other.getStartVersion());
result = result && (getCurrentTs()
== other.getCurrentTs());
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 (hasContext()) {
hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + getContext().hashCode();
}
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + START_VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStartVersion());
hash = (37 * hash) + CURRENT_TS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCurrentTs());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tikv.kvproto.Kvrpcpb.CleanupRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.CleanupRequest 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.Kvrpcpb.CleanupRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.CleanupRequest 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.Kvrpcpb.CleanupRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tikv.kvproto.Kvrpcpb.CleanupRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tikv.kvproto.Kvrpcpb.CleanupRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.CleanupRequest 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.Kvrpcpb.CleanupRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.CleanupRequest 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.Kvrpcpb.CleanupRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tikv.kvproto.Kvrpcpb.CleanupRequest 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.Kvrpcpb.CleanupRequest 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;
}
/**
*
* Cleanup a key by possibly unlocking it.
* From 4.0 onwards, this message is no longer used.
*
* The current timestamp, used in combination with a lock's TTL to determine
* if the lock has expired. If `current_ts == 0`, then the key will be unlocked
* irrespective of its TTL.
*
*
* uint64 current_ts = 4;
*/
public long getCurrentTs() {
return currentTs_;
}
/**
*
* The current timestamp, used in combination with a lock's TTL to determine
* if the lock has expired. If `current_ts == 0`, then the key will be unlocked
* irrespective of its TTL.
*
* The current timestamp, used in combination with a lock's TTL to determine
* if the lock has expired. If `current_ts == 0`, then the key will be unlocked
* irrespective of its TTL.
*
*
* uint64 current_ts = 4;
*/
public Builder clearCurrentTs() {
currentTs_ = 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:kvrpcpb.CleanupRequest)
}
// @@protoc_insertion_point(class_scope:kvrpcpb.CleanupRequest)
private static final org.tikv.kvproto.Kvrpcpb.CleanupRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tikv.kvproto.Kvrpcpb.CleanupRequest();
}
public static org.tikv.kvproto.Kvrpcpb.CleanupRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public CleanupRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CleanupRequest(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.Kvrpcpb.CleanupRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CleanupResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:kvrpcpb.CleanupResponse)
com.google.protobuf.MessageOrBuilder {
/**
* .errorpb.Error region_error = 1;
*/
boolean hasRegionError();
/**
* .errorpb.Error region_error = 1;
*/
org.tikv.kvproto.Errorpb.Error getRegionError();
/**
* .errorpb.Error region_error = 1;
*/
org.tikv.kvproto.Errorpb.ErrorOrBuilder getRegionErrorOrBuilder();
/**
* .kvrpcpb.KeyError error = 2;
*/
boolean hasError();
/**
* .kvrpcpb.KeyError error = 2;
*/
org.tikv.kvproto.Kvrpcpb.KeyError getError();
/**
* .kvrpcpb.KeyError error = 2;
*/
org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder getErrorOrBuilder();
/**
*
* Set if the key is already committed.
*
*
* uint64 commit_version = 3;
*/
long getCommitVersion();
}
/**
* Protobuf type {@code kvrpcpb.CleanupResponse}
*/
public static final class CleanupResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:kvrpcpb.CleanupResponse)
CleanupResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use CleanupResponse.newBuilder() to construct.
private CleanupResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CleanupResponse() {
commitVersion_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CleanupResponse(
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.Errorpb.Error.Builder subBuilder = null;
if (regionError_ != null) {
subBuilder = regionError_.toBuilder();
}
regionError_ = input.readMessage(org.tikv.kvproto.Errorpb.Error.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(regionError_);
regionError_ = subBuilder.buildPartial();
}
break;
}
case 18: {
org.tikv.kvproto.Kvrpcpb.KeyError.Builder subBuilder = null;
if (error_ != null) {
subBuilder = error_.toBuilder();
}
error_ = input.readMessage(org.tikv.kvproto.Kvrpcpb.KeyError.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(error_);
error_ = subBuilder.buildPartial();
}
break;
}
case 24: {
commitVersion_ = 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.Kvrpcpb.internal_static_kvrpcpb_CleanupResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tikv.kvproto.Kvrpcpb.internal_static_kvrpcpb_CleanupResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tikv.kvproto.Kvrpcpb.CleanupResponse.class, org.tikv.kvproto.Kvrpcpb.CleanupResponse.Builder.class);
}
public static final int REGION_ERROR_FIELD_NUMBER = 1;
private org.tikv.kvproto.Errorpb.Error regionError_;
/**
* .errorpb.Error region_error = 1;
*/
public boolean hasRegionError() {
return regionError_ != null;
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.Error getRegionError() {
return regionError_ == null ? org.tikv.kvproto.Errorpb.Error.getDefaultInstance() : regionError_;
}
/**
* .errorpb.Error region_error = 1;
*/
public org.tikv.kvproto.Errorpb.ErrorOrBuilder getRegionErrorOrBuilder() {
return getRegionError();
}
public static final int ERROR_FIELD_NUMBER = 2;
private org.tikv.kvproto.Kvrpcpb.KeyError error_;
/**
* .kvrpcpb.KeyError error = 2;
*/
public boolean hasError() {
return error_ != null;
}
/**
* .kvrpcpb.KeyError error = 2;
*/
public org.tikv.kvproto.Kvrpcpb.KeyError getError() {
return error_ == null ? org.tikv.kvproto.Kvrpcpb.KeyError.getDefaultInstance() : error_;
}
/**
* .kvrpcpb.KeyError error = 2;
*/
public org.tikv.kvproto.Kvrpcpb.KeyErrorOrBuilder getErrorOrBuilder() {
return getError();
}
public static final int COMMIT_VERSION_FIELD_NUMBER = 3;
private long commitVersion_;
/**
*