public static final class Kvrpcpb.PessimisticLockRequest extends com.google.protobuf.GeneratedMessageV3 implements Kvrpcpb.PessimisticLockRequestOrBuilder
Lock a set of keys to prepare to write to them.Protobuf type
kvrpcpb.PessimisticLockRequest| 限定符和类型 | 类和说明 |
|---|---|
static class |
Kvrpcpb.PessimisticLockRequest.Builder
Lock a set of keys to prepare to write to them.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| 限定符和类型 | 字段和说明 |
|---|---|
static int |
CHECK_EXISTENCE_FIELD_NUMBER |
static int |
CONTEXT_FIELD_NUMBER |
static int |
FOR_UPDATE_TS_FIELD_NUMBER |
static int |
FORCE_FIELD_NUMBER |
static int |
IS_FIRST_LOCK_FIELD_NUMBER |
static int |
LOCK_TTL_FIELD_NUMBER |
static int |
MIN_COMMIT_TS_FIELD_NUMBER |
static int |
MUTATIONS_FIELD_NUMBER |
static int |
PRIMARY_LOCK_FIELD_NUMBER |
static int |
RETURN_VALUES_FIELD_NUMBER |
static int |
START_VERSION_FIELD_NUMBER |
static int |
WAIT_TIMEOUT_FIELD_NUMBER |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object obj) |
boolean |
getCheckExistence()
If set to true, it means TiKV need to check if the key exists, and return the result in
the `not_founds` feild in the response.
|
Kvrpcpb.Context |
getContext()
.kvrpcpb.Context context = 1; |
Kvrpcpb.ContextOrBuilder |
getContextOrBuilder()
.kvrpcpb.Context context = 1; |
static Kvrpcpb.PessimisticLockRequest |
getDefaultInstance() |
Kvrpcpb.PessimisticLockRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
boolean |
getForce()
已过时。
|
long |
getForUpdateTs()
Each locking command in a pessimistic transaction has its own timestamp.
|
boolean |
getIsFirstLock()
If the request is the first lock request, we don't need to detect deadlock.
|
long |
getLockTtl()
uint64 lock_ttl = 5; |
long |
getMinCommitTs()
If min_commit_ts > 0, this is large transaction proto, the final commit_ts
would be infered from min_commit_ts.
|
Kvrpcpb.Mutation |
getMutations(int index)
In this case every `Op` of the mutations must be `PessimisticLock`.
|
int |
getMutationsCount()
In this case every `Op` of the mutations must be `PessimisticLock`.
|
List<Kvrpcpb.Mutation> |
getMutationsList()
In this case every `Op` of the mutations must be `PessimisticLock`.
|
Kvrpcpb.MutationOrBuilder |
getMutationsOrBuilder(int index)
In this case every `Op` of the mutations must be `PessimisticLock`.
|
List<? extends Kvrpcpb.MutationOrBuilder> |
getMutationsOrBuilderList()
In this case every `Op` of the mutations must be `PessimisticLock`.
|
com.google.protobuf.Parser<Kvrpcpb.PessimisticLockRequest> |
getParserForType() |
com.google.protobuf.ByteString |
getPrimaryLock()
bytes primary_lock = 3; |
boolean |
getReturnValues()
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.
|
int |
getSerializedSize() |
long |
getStartVersion()
uint64 start_version = 4; |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
long |
getWaitTimeout()
Time to wait for lock released in milliseconds when encountering locks.
0 means using default timeout in TiKV.
|
boolean |
hasContext()
.kvrpcpb.Context context = 1; |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Kvrpcpb.PessimisticLockRequest.Builder |
newBuilder() |
static Kvrpcpb.PessimisticLockRequest.Builder |
newBuilder(Kvrpcpb.PessimisticLockRequest prototype) |
Kvrpcpb.PessimisticLockRequest.Builder |
newBuilderForType() |
protected Kvrpcpb.PessimisticLockRequest.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static Kvrpcpb.PessimisticLockRequest |
parseDelimitedFrom(InputStream input) |
static Kvrpcpb.PessimisticLockRequest |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Kvrpcpb.PessimisticLockRequest |
parseFrom(byte[] data) |
static Kvrpcpb.PessimisticLockRequest |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Kvrpcpb.PessimisticLockRequest |
parseFrom(ByteBuffer data) |
static Kvrpcpb.PessimisticLockRequest |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Kvrpcpb.PessimisticLockRequest |
parseFrom(com.google.protobuf.ByteString data) |
static Kvrpcpb.PessimisticLockRequest |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Kvrpcpb.PessimisticLockRequest |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Kvrpcpb.PessimisticLockRequest |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Kvrpcpb.PessimisticLockRequest |
parseFrom(InputStream input) |
static Kvrpcpb.PessimisticLockRequest |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Kvrpcpb.PessimisticLockRequest> |
parser() |
Kvrpcpb.PessimisticLockRequest.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newInstance, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTopublic static final int CONTEXT_FIELD_NUMBER
public static final int MUTATIONS_FIELD_NUMBER
public static final int PRIMARY_LOCK_FIELD_NUMBER
public static final int START_VERSION_FIELD_NUMBER
public static final int LOCK_TTL_FIELD_NUMBER
public static final int FOR_UPDATE_TS_FIELD_NUMBER
public static final int IS_FIRST_LOCK_FIELD_NUMBER
public static final int WAIT_TIMEOUT_FIELD_NUMBER
public static final int FORCE_FIELD_NUMBER
public static final int RETURN_VALUES_FIELD_NUMBER
public static final int MIN_COMMIT_TS_FIELD_NUMBER
public static final int CHECK_EXISTENCE_FIELD_NUMBER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields 在接口中 com.google.protobuf.MessageOrBuildergetUnknownFields 在类中 com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable 在类中 com.google.protobuf.GeneratedMessageV3public boolean hasContext()
.kvrpcpb.Context context = 1;public Kvrpcpb.Context getContext()
.kvrpcpb.Context context = 1;public Kvrpcpb.ContextOrBuilder getContextOrBuilder()
.kvrpcpb.Context context = 1;public List<Kvrpcpb.Mutation> getMutationsList()
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .kvrpcpb.Mutation mutations = 2;public List<? extends Kvrpcpb.MutationOrBuilder> getMutationsOrBuilderList()
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .kvrpcpb.Mutation mutations = 2;public int getMutationsCount()
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .kvrpcpb.Mutation mutations = 2;public Kvrpcpb.Mutation getMutations(int index)
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .kvrpcpb.Mutation mutations = 2;public Kvrpcpb.MutationOrBuilder getMutationsOrBuilder(int index)
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .kvrpcpb.Mutation mutations = 2;public com.google.protobuf.ByteString getPrimaryLock()
bytes primary_lock = 3;public long getStartVersion()
uint64 start_version = 4;public long getLockTtl()
uint64 lock_ttl = 5;public long getForUpdateTs()
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 boolean getIsFirstLock()
If the request is the first lock request, we don't need to detect deadlock.
bool is_first_lock = 7;public long getWaitTimeout()
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;@Deprecated public boolean getForce()
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 [deprecated = true];public boolean getReturnValues()
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 long getMinCommitTs()
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 boolean getCheckExistence()
If set to true, it means TiKV need to check if the key exists, and return the result in the `not_founds` feild in the response. This works no matter if `return_values` is set. If `return_values` is set, it simply makes no difference; otherwise, the `value` field of the repsonse will be empty while the `not_founds` field still indicates the keys' existence.
bool check_existence = 12;public final boolean isInitialized()
isInitialized 在接口中 com.google.protobuf.MessageLiteOrBuilderisInitialized 在类中 com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo 在接口中 com.google.protobuf.MessageLitewriteTo 在类中 com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize 在接口中 com.google.protobuf.MessageLitegetSerializedSize 在类中 com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals 在接口中 com.google.protobuf.Messageequals 在类中 com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode 在接口中 com.google.protobuf.MessagehashCode 在类中 com.google.protobuf.AbstractMessagepublic static Kvrpcpb.PessimisticLockRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Kvrpcpb.PessimisticLockRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Kvrpcpb.PessimisticLockRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Kvrpcpb.PessimisticLockRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Kvrpcpb.PessimisticLockRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Kvrpcpb.PessimisticLockRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Kvrpcpb.PessimisticLockRequest parseFrom(InputStream input) throws IOException
IOExceptionpublic static Kvrpcpb.PessimisticLockRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Kvrpcpb.PessimisticLockRequest parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Kvrpcpb.PessimisticLockRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Kvrpcpb.PessimisticLockRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Kvrpcpb.PessimisticLockRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Kvrpcpb.PessimisticLockRequest.Builder newBuilderForType()
newBuilderForType 在接口中 com.google.protobuf.MessagenewBuilderForType 在接口中 com.google.protobuf.MessageLitepublic static Kvrpcpb.PessimisticLockRequest.Builder newBuilder()
public static Kvrpcpb.PessimisticLockRequest.Builder newBuilder(Kvrpcpb.PessimisticLockRequest prototype)
public Kvrpcpb.PessimisticLockRequest.Builder toBuilder()
toBuilder 在接口中 com.google.protobuf.MessagetoBuilder 在接口中 com.google.protobuf.MessageLiteprotected Kvrpcpb.PessimisticLockRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType 在类中 com.google.protobuf.GeneratedMessageV3public static Kvrpcpb.PessimisticLockRequest getDefaultInstance()
public static com.google.protobuf.Parser<Kvrpcpb.PessimisticLockRequest> parser()
public com.google.protobuf.Parser<Kvrpcpb.PessimisticLockRequest> getParserForType()
getParserForType 在接口中 com.google.protobuf.MessagegetParserForType 在接口中 com.google.protobuf.MessageLitegetParserForType 在类中 com.google.protobuf.GeneratedMessageV3public Kvrpcpb.PessimisticLockRequest getDefaultInstanceForType()
getDefaultInstanceForType 在接口中 com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType 在接口中 com.google.protobuf.MessageOrBuilderCopyright © 2023 PingCAP. All rights reserved.