public static final class Kvrpcpb.PrewriteRequest extends com.google.protobuf.GeneratedMessageV3 implements Kvrpcpb.PrewriteRequestOrBuilder
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
kvrpcpb.PrewriteRequest| 限定符和类型 | 类和说明 |
|---|---|
static class |
Kvrpcpb.PrewriteRequest.Builder
A prewrite is the first phase of writing to TiKV.
|
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 |
ASSERTION_LEVEL_FIELD_NUMBER |
static int |
CONTEXT_FIELD_NUMBER |
static int |
FOR_UPDATE_TS_FIELD_NUMBER |
static int |
IS_PESSIMISTIC_LOCK_FIELD_NUMBER |
static int |
LOCK_TTL_FIELD_NUMBER |
static int |
MAX_COMMIT_TS_FIELD_NUMBER |
static int |
MIN_COMMIT_TS_FIELD_NUMBER |
static int |
MUTATIONS_FIELD_NUMBER |
static int |
PRIMARY_LOCK_FIELD_NUMBER |
static int |
SECONDARIES_FIELD_NUMBER |
static int |
SKIP_CONSTRAINT_CHECK_FIELD_NUMBER |
static int |
START_VERSION_FIELD_NUMBER |
static int |
TRY_ONE_PC_FIELD_NUMBER |
static int |
TXN_SIZE_FIELD_NUMBER |
static int |
USE_ASYNC_COMMIT_FIELD_NUMBER |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object obj) |
Kvrpcpb.AssertionLevel |
getAssertionLevel()
The level of assertion to use on this prewrte request.
|
int |
getAssertionLevelValue()
The level of assertion to use on this prewrte request.
|
Kvrpcpb.Context |
getContext()
.kvrpcpb.Context context = 1; |
Kvrpcpb.ContextOrBuilder |
getContextOrBuilder()
.kvrpcpb.Context context = 1; |
static Kvrpcpb.PrewriteRequest |
getDefaultInstance() |
Kvrpcpb.PrewriteRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
long |
getForUpdateTs()
For pessimistic transactions only; used to check if a conflict lock is already committed.
|
boolean |
getIsPessimisticLock(int index)
For pessimistic transaction, some mutations don't need to be locked, for example, non-unique index key.
|
int |
getIsPessimisticLockCount()
For pessimistic transaction, some mutations don't need to be locked, for example, non-unique index key.
|
List<Boolean> |
getIsPessimisticLockList()
For pessimistic transaction, some mutations don't need to be locked, for example, non-unique index key.
|
long |
getLockTtl()
uint64 lock_ttl = 5; |
long |
getMaxCommitTs()
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.
|
long |
getMinCommitTs()
If min_commit_ts > 0, this is a large transaction request, the final commit_ts
will be inferred from `min_commit_ts`.
|
Kvrpcpb.Mutation |
getMutations(int index)
The data to be written to the database.
|
int |
getMutationsCount()
The data to be written to the database.
|
List<Kvrpcpb.Mutation> |
getMutationsList()
The data to be written to the database.
|
Kvrpcpb.MutationOrBuilder |
getMutationsOrBuilder(int index)
The data to be written to the database.
|
List<? extends Kvrpcpb.MutationOrBuilder> |
getMutationsOrBuilderList()
The data to be written to the database.
|
com.google.protobuf.Parser<Kvrpcpb.PrewriteRequest> |
getParserForType() |
com.google.protobuf.ByteString |
getPrimaryLock()
The client picks one key to be primary (unrelated to the primary key concept in SQL).
|
com.google.protobuf.ByteString |
getSecondaries(int index)
repeated bytes secondaries = 12; |
int |
getSecondariesCount()
repeated bytes secondaries = 12; |
List<com.google.protobuf.ByteString> |
getSecondariesList()
repeated bytes secondaries = 12; |
int |
getSerializedSize() |
boolean |
getSkipConstraintCheck()
TiKV can skip some checks, used for speeding up data migration.
|
long |
getStartVersion()
Identifies the transaction being written.
|
boolean |
getTryOnePc()
When the transaction involves only one region, it's possible to commit the transaction
directly with 1PC protocol.
|
long |
getTxnSize()
How many keys this transaction involves in this region.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
getUseAsyncCommit()
When async commit is enabled, `secondaries` should be set as the key list of all secondary
locks if the request prewrites the primary lock.
|
boolean |
hasContext()
.kvrpcpb.Context context = 1; |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Kvrpcpb.PrewriteRequest.Builder |
newBuilder() |
static Kvrpcpb.PrewriteRequest.Builder |
newBuilder(Kvrpcpb.PrewriteRequest prototype) |
Kvrpcpb.PrewriteRequest.Builder |
newBuilderForType() |
protected Kvrpcpb.PrewriteRequest.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static Kvrpcpb.PrewriteRequest |
parseDelimitedFrom(InputStream input) |
static Kvrpcpb.PrewriteRequest |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Kvrpcpb.PrewriteRequest |
parseFrom(byte[] data) |
static Kvrpcpb.PrewriteRequest |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Kvrpcpb.PrewriteRequest |
parseFrom(ByteBuffer data) |
static Kvrpcpb.PrewriteRequest |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Kvrpcpb.PrewriteRequest |
parseFrom(com.google.protobuf.ByteString data) |
static Kvrpcpb.PrewriteRequest |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Kvrpcpb.PrewriteRequest |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Kvrpcpb.PrewriteRequest |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Kvrpcpb.PrewriteRequest |
parseFrom(InputStream input) |
static Kvrpcpb.PrewriteRequest |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Kvrpcpb.PrewriteRequest> |
parser() |
Kvrpcpb.PrewriteRequest.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 SKIP_CONSTRAINT_CHECK_FIELD_NUMBER
public static final int IS_PESSIMISTIC_LOCK_FIELD_NUMBER
public static final int TXN_SIZE_FIELD_NUMBER
public static final int FOR_UPDATE_TS_FIELD_NUMBER
public static final int MIN_COMMIT_TS_FIELD_NUMBER
public static final int USE_ASYNC_COMMIT_FIELD_NUMBER
public static final int SECONDARIES_FIELD_NUMBER
public static final int TRY_ONE_PC_FIELD_NUMBER
public static final int MAX_COMMIT_TS_FIELD_NUMBER
public static final int ASSERTION_LEVEL_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;hasContext 在接口中 Kvrpcpb.PrewriteRequestOrBuilderpublic Kvrpcpb.Context getContext()
.kvrpcpb.Context context = 1;getContext 在接口中 Kvrpcpb.PrewriteRequestOrBuilderpublic Kvrpcpb.ContextOrBuilder getContextOrBuilder()
.kvrpcpb.Context context = 1;public List<Kvrpcpb.Mutation> getMutationsList()
The data to be written to the database.
repeated .kvrpcpb.Mutation mutations = 2;public List<? extends Kvrpcpb.MutationOrBuilder> getMutationsOrBuilderList()
The data to be written to the database.
repeated .kvrpcpb.Mutation mutations = 2;public int getMutationsCount()
The data to be written to the database.
repeated .kvrpcpb.Mutation mutations = 2;public Kvrpcpb.Mutation getMutations(int index)
The data to be written to the database.
repeated .kvrpcpb.Mutation mutations = 2;getMutations 在接口中 Kvrpcpb.PrewriteRequestOrBuilderpublic Kvrpcpb.MutationOrBuilder getMutationsOrBuilder(int index)
The data to be written to the database.
repeated .kvrpcpb.Mutation mutations = 2;public com.google.protobuf.ByteString getPrimaryLock()
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 long getStartVersion()
Identifies the transaction being written.
uint64 start_version = 4;public long getLockTtl()
uint64 lock_ttl = 5;getLockTtl 在接口中 Kvrpcpb.PrewriteRequestOrBuilderpublic boolean getSkipConstraintCheck()
TiKV can skip some checks, used for speeding up data migration.
bool skip_constraint_check = 6;public List<Boolean> getIsPessimisticLockList()
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()
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)
For pessimistic transaction, some mutations don't need to be locked, for example, non-unique index key.
repeated bool is_pessimistic_lock = 7;public long getTxnSize()
How many keys this transaction involves in this region.
uint64 txn_size = 8;getTxnSize 在接口中 Kvrpcpb.PrewriteRequestOrBuilderpublic long getForUpdateTs()
For pessimistic transactions only; used to check if a conflict lock is already committed.
uint64 for_update_ts = 9;public long getMinCommitTs()
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 boolean getUseAsyncCommit()
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 List<com.google.protobuf.ByteString> getSecondariesList()
repeated bytes secondaries = 12;public int getSecondariesCount()
repeated bytes secondaries = 12;public com.google.protobuf.ByteString getSecondaries(int index)
repeated bytes secondaries = 12;public boolean getTryOnePc()
When the transaction involves only one region, it's possible to commit the transaction directly with 1PC protocol.
bool try_one_pc = 13;getTryOnePc 在接口中 Kvrpcpb.PrewriteRequestOrBuilderpublic long getMaxCommitTs()
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 int getAssertionLevelValue()
The level of assertion to use on this prewrte request.
.kvrpcpb.AssertionLevel assertion_level = 15;public Kvrpcpb.AssertionLevel getAssertionLevel()
The level of assertion to use on this prewrte request.
.kvrpcpb.AssertionLevel assertion_level = 15;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.PrewriteRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Kvrpcpb.PrewriteRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Kvrpcpb.PrewriteRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Kvrpcpb.PrewriteRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Kvrpcpb.PrewriteRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Kvrpcpb.PrewriteRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Kvrpcpb.PrewriteRequest parseFrom(InputStream input) throws IOException
IOExceptionpublic static Kvrpcpb.PrewriteRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Kvrpcpb.PrewriteRequest parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Kvrpcpb.PrewriteRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Kvrpcpb.PrewriteRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Kvrpcpb.PrewriteRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Kvrpcpb.PrewriteRequest.Builder newBuilderForType()
newBuilderForType 在接口中 com.google.protobuf.MessagenewBuilderForType 在接口中 com.google.protobuf.MessageLitepublic static Kvrpcpb.PrewriteRequest.Builder newBuilder()
public static Kvrpcpb.PrewriteRequest.Builder newBuilder(Kvrpcpb.PrewriteRequest prototype)
public Kvrpcpb.PrewriteRequest.Builder toBuilder()
toBuilder 在接口中 com.google.protobuf.MessagetoBuilder 在接口中 com.google.protobuf.MessageLiteprotected Kvrpcpb.PrewriteRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType 在类中 com.google.protobuf.GeneratedMessageV3public static Kvrpcpb.PrewriteRequest getDefaultInstance()
public static com.google.protobuf.Parser<Kvrpcpb.PrewriteRequest> parser()
public com.google.protobuf.Parser<Kvrpcpb.PrewriteRequest> getParserForType()
getParserForType 在接口中 com.google.protobuf.MessagegetParserForType 在接口中 com.google.protobuf.MessageLitegetParserForType 在类中 com.google.protobuf.GeneratedMessageV3public Kvrpcpb.PrewriteRequest getDefaultInstanceForType()
getDefaultInstanceForType 在接口中 com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType 在接口中 com.google.protobuf.MessageOrBuilderCopyright © 2023 PingCAP. All rights reserved.