Class Store.TxnPrewriteRequest

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.dingodb.store.Store.TxnPrewriteRequest
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Store.TxnPrewriteRequestOrBuilder, Serializable
Enclosing class:
Store

public static final class Store.TxnPrewriteRequest extends com.google.protobuf.GeneratedMessageV3 implements Store.TxnPrewriteRequestOrBuilder
Protobuf type dingodb.pb.store.TxnPrewriteRequest
See Also:
  • Field Details

    • REQUEST_INFO_FIELD_NUMBER

      public static final int REQUEST_INFO_FIELD_NUMBER
      See Also:
    • CONTEXT_FIELD_NUMBER

      public static final int CONTEXT_FIELD_NUMBER
      See Also:
    • MUTATIONS_FIELD_NUMBER

      public static final int MUTATIONS_FIELD_NUMBER
      See Also:
    • PRIMARY_LOCK_FIELD_NUMBER

      public static final int PRIMARY_LOCK_FIELD_NUMBER
      See Also:
    • START_TS_FIELD_NUMBER

      public static final int START_TS_FIELD_NUMBER
      See Also:
    • LOCK_TTL_FIELD_NUMBER

      public static final int LOCK_TTL_FIELD_NUMBER
      See Also:
    • TXN_SIZE_FIELD_NUMBER

      public static final int TXN_SIZE_FIELD_NUMBER
      See Also:
    • TRY_ONE_PC_FIELD_NUMBER

      public static final int TRY_ONE_PC_FIELD_NUMBER
      See Also:
    • MAX_COMMIT_TS_FIELD_NUMBER

      public static final int MAX_COMMIT_TS_FIELD_NUMBER
      See Also:
    • PESSIMISTIC_CHECKS_FIELD_NUMBER

      public static final int PESSIMISTIC_CHECKS_FIELD_NUMBER
      See Also:
    • FOR_UPDATE_TS_CHECKS_FIELD_NUMBER

      public static final int FOR_UPDATE_TS_CHECKS_FIELD_NUMBER
      See Also:
    • LOCK_EXTRA_DATAS_FIELD_NUMBER

      public static final int LOCK_EXTRA_DATAS_FIELD_NUMBER
      See Also:
    • MIN_COMMIT_TS_FIELD_NUMBER

      public static final int MIN_COMMIT_TS_FIELD_NUMBER
      See Also:
    • USE_ASYNC_COMMIT_FIELD_NUMBER

      public static final int USE_ASYNC_COMMIT_FIELD_NUMBER
      See Also:
    • SECONDARIES_FIELD_NUMBER

      public static final int SECONDARIES_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • hasRequestInfo

      public boolean hasRequestInfo()
      .dingodb.pb.common.RequestInfo request_info = 1;
      Specified by:
      hasRequestInfo in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      Whether the requestInfo field is set.
    • getRequestInfo

      public Common.RequestInfo getRequestInfo()
      .dingodb.pb.common.RequestInfo request_info = 1;
      Specified by:
      getRequestInfo in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      The requestInfo.
    • getRequestInfoOrBuilder

      public Common.RequestInfoOrBuilder getRequestInfoOrBuilder()
      .dingodb.pb.common.RequestInfo request_info = 1;
      Specified by:
      getRequestInfoOrBuilder in interface Store.TxnPrewriteRequestOrBuilder
    • hasContext

      public boolean hasContext()
      .dingodb.pb.store.Context context = 2;
      Specified by:
      hasContext in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      Whether the context field is set.
    • getContext

      public Store.Context getContext()
      .dingodb.pb.store.Context context = 2;
      Specified by:
      getContext in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      The context.
    • getContextOrBuilder

      public Store.ContextOrBuilder getContextOrBuilder()
      .dingodb.pb.store.Context context = 2;
      Specified by:
      getContextOrBuilder in interface Store.TxnPrewriteRequestOrBuilder
    • getMutationsList

      public List<Store.Mutation> getMutationsList()
       The data to be written to the database.
       
      repeated .dingodb.pb.store.Mutation mutations = 3;
      Specified by:
      getMutationsList in interface Store.TxnPrewriteRequestOrBuilder
    • getMutationsOrBuilderList

      public List<? extends Store.MutationOrBuilder> getMutationsOrBuilderList()
       The data to be written to the database.
       
      repeated .dingodb.pb.store.Mutation mutations = 3;
      Specified by:
      getMutationsOrBuilderList in interface Store.TxnPrewriteRequestOrBuilder
    • getMutationsCount

      public int getMutationsCount()
       The data to be written to the database.
       
      repeated .dingodb.pb.store.Mutation mutations = 3;
      Specified by:
      getMutationsCount in interface Store.TxnPrewriteRequestOrBuilder
    • getMutations

      public Store.Mutation getMutations(int index)
       The data to be written to the database.
       
      repeated .dingodb.pb.store.Mutation mutations = 3;
      Specified by:
      getMutations in interface Store.TxnPrewriteRequestOrBuilder
    • getMutationsOrBuilder

      public Store.MutationOrBuilder getMutationsOrBuilder(int index)
       The data to be written to the database.
       
      repeated .dingodb.pb.store.Mutation mutations = 3;
      Specified by:
      getMutationsOrBuilder in interface Store.TxnPrewriteRequestOrBuilder
    • getPrimaryLock

      public com.google.protobuf.ByteString getPrimaryLock()
       The primary lock of the transaction is setup by client
       
      bytes primary_lock = 4;
      Specified by:
      getPrimaryLock in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      The primaryLock.
    • getStartTs

      public long getStartTs()
       Identifies the transaction being written.
       
      int64 start_ts = 5;
      Specified by:
      getStartTs in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      The startTs.
    • getLockTtl

      public long getLockTtl()
       the lock's ttl is timestamp in milisecond.
       
      int64 lock_ttl = 6;
      Specified by:
      getLockTtl in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      The lockTtl.
    • getTxnSize

      public long getTxnSize()
       the number of keys involved in the transaction
       
      int64 txn_size = 7;
      Specified by:
      getTxnSize in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      The txnSize.
    • getTryOnePc

      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 = 8;
      Specified by:
      getTryOnePc in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      The tryOnePc.
    • getMaxCommitTs

      public long getMaxCommitTs()
       The max commit ts is reserved for limiting the commit ts of 1PC, which can be used to avoid inconsistency with
       schema change. This field is unused now.
       
      int64 max_commit_ts = 9;
      Specified by:
      getMaxCommitTs in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      The maxCommitTs.
    • getPessimisticChecksList

      public List<Store.TxnPrewriteRequest.PessimisticCheck> getPessimisticChecksList()
       for pessimistic transaction
       check if the keys is locked by pessimistic transaction
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.PessimisticCheck pessimistic_checks = 10;
      Specified by:
      getPessimisticChecksList in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      A list containing the pessimisticChecks.
    • getPessimisticChecksCount

      public int getPessimisticChecksCount()
       for pessimistic transaction
       check if the keys is locked by pessimistic transaction
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.PessimisticCheck pessimistic_checks = 10;
      Specified by:
      getPessimisticChecksCount in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      The count of pessimisticChecks.
    • getPessimisticChecks

      public Store.TxnPrewriteRequest.PessimisticCheck getPessimisticChecks(int index)
       for pessimistic transaction
       check if the keys is locked by pessimistic transaction
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.PessimisticCheck pessimistic_checks = 10;
      Specified by:
      getPessimisticChecks in interface Store.TxnPrewriteRequestOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The pessimisticChecks at the given index.
    • getPessimisticChecksValueList

      public List<Integer> getPessimisticChecksValueList()
       for pessimistic transaction
       check if the keys is locked by pessimistic transaction
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.PessimisticCheck pessimistic_checks = 10;
      Specified by:
      getPessimisticChecksValueList in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for pessimisticChecks.
    • getPessimisticChecksValue

      public int getPessimisticChecksValue(int index)
       for pessimistic transaction
       check if the keys is locked by pessimistic transaction
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.PessimisticCheck pessimistic_checks = 10;
      Specified by:
      getPessimisticChecksValue in interface Store.TxnPrewriteRequestOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of pessimisticChecks at the given index.
    • getForUpdateTsChecksList

      public List<Store.TxnPrewriteRequest.ForUpdateTsCheck> getForUpdateTsChecksList()
       fo pessimistic transaction
       for_update_ts constriants that should be checked when prewriting a pessimistic transaction.
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.ForUpdateTsCheck for_update_ts_checks = 11;
      Specified by:
      getForUpdateTsChecksList in interface Store.TxnPrewriteRequestOrBuilder
    • getForUpdateTsChecksOrBuilderList

      public List<? extends Store.TxnPrewriteRequest.ForUpdateTsCheckOrBuilder> getForUpdateTsChecksOrBuilderList()
       fo pessimistic transaction
       for_update_ts constriants that should be checked when prewriting a pessimistic transaction.
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.ForUpdateTsCheck for_update_ts_checks = 11;
      Specified by:
      getForUpdateTsChecksOrBuilderList in interface Store.TxnPrewriteRequestOrBuilder
    • getForUpdateTsChecksCount

      public int getForUpdateTsChecksCount()
       fo pessimistic transaction
       for_update_ts constriants that should be checked when prewriting a pessimistic transaction.
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.ForUpdateTsCheck for_update_ts_checks = 11;
      Specified by:
      getForUpdateTsChecksCount in interface Store.TxnPrewriteRequestOrBuilder
    • getForUpdateTsChecks

      public Store.TxnPrewriteRequest.ForUpdateTsCheck getForUpdateTsChecks(int index)
       fo pessimistic transaction
       for_update_ts constriants that should be checked when prewriting a pessimistic transaction.
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.ForUpdateTsCheck for_update_ts_checks = 11;
      Specified by:
      getForUpdateTsChecks in interface Store.TxnPrewriteRequestOrBuilder
    • getForUpdateTsChecksOrBuilder

      public Store.TxnPrewriteRequest.ForUpdateTsCheckOrBuilder getForUpdateTsChecksOrBuilder(int index)
       fo pessimistic transaction
       for_update_ts constriants that should be checked when prewriting a pessimistic transaction.
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.ForUpdateTsCheck for_update_ts_checks = 11;
      Specified by:
      getForUpdateTsChecksOrBuilder in interface Store.TxnPrewriteRequestOrBuilder
    • getLockExtraDatasList

      public List<Store.TxnPrewriteRequest.LockExtraData> getLockExtraDatasList()
       for both pessimistic and optimistic transaction
       the extra_data executor want to store in lock
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.LockExtraData lock_extra_datas = 12;
      Specified by:
      getLockExtraDatasList in interface Store.TxnPrewriteRequestOrBuilder
    • getLockExtraDatasOrBuilderList

      public List<? extends Store.TxnPrewriteRequest.LockExtraDataOrBuilder> getLockExtraDatasOrBuilderList()
       for both pessimistic and optimistic transaction
       the extra_data executor want to store in lock
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.LockExtraData lock_extra_datas = 12;
      Specified by:
      getLockExtraDatasOrBuilderList in interface Store.TxnPrewriteRequestOrBuilder
    • getLockExtraDatasCount

      public int getLockExtraDatasCount()
       for both pessimistic and optimistic transaction
       the extra_data executor want to store in lock
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.LockExtraData lock_extra_datas = 12;
      Specified by:
      getLockExtraDatasCount in interface Store.TxnPrewriteRequestOrBuilder
    • getLockExtraDatas

      public Store.TxnPrewriteRequest.LockExtraData getLockExtraDatas(int index)
       for both pessimistic and optimistic transaction
       the extra_data executor want to store in lock
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.LockExtraData lock_extra_datas = 12;
      Specified by:
      getLockExtraDatas in interface Store.TxnPrewriteRequestOrBuilder
    • getLockExtraDatasOrBuilder

      public Store.TxnPrewriteRequest.LockExtraDataOrBuilder getLockExtraDatasOrBuilder(int index)
       for both pessimistic and optimistic transaction
       the extra_data executor want to store in lock
       
      repeated .dingodb.pb.store.TxnPrewriteRequest.LockExtraData lock_extra_datas = 12;
      Specified by:
      getLockExtraDatasOrBuilder in interface Store.TxnPrewriteRequestOrBuilder
    • getMinCommitTs

      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`.
       
      int64 min_commit_ts = 13;
      Specified by:
      getMinCommitTs in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      The minCommitTs.
    • getUseAsyncCommit

      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 = 14;
      Specified by:
      getUseAsyncCommit in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      The useAsyncCommit.
    • getSecondariesList

      public List<com.google.protobuf.ByteString> getSecondariesList()
      repeated bytes secondaries = 15;
      Specified by:
      getSecondariesList in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      A list containing the secondaries.
    • getSecondariesCount

      public int getSecondariesCount()
      repeated bytes secondaries = 15;
      Specified by:
      getSecondariesCount in interface Store.TxnPrewriteRequestOrBuilder
      Returns:
      The count of secondaries.
    • getSecondaries

      public com.google.protobuf.ByteString getSecondaries(int index)
      repeated bytes secondaries = 15;
      Specified by:
      getSecondaries in interface Store.TxnPrewriteRequestOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The secondaries at the given index.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Store.TxnPrewriteRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Store.TxnPrewriteRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Store.TxnPrewriteRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Store.TxnPrewriteRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Store.TxnPrewriteRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Store.TxnPrewriteRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Store.TxnPrewriteRequest parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Store.TxnPrewriteRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Store.TxnPrewriteRequest parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Store.TxnPrewriteRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Store.TxnPrewriteRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Store.TxnPrewriteRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Store.TxnPrewriteRequest.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Store.TxnPrewriteRequest.Builder newBuilder()
    • newBuilder

      public static Store.TxnPrewriteRequest.Builder newBuilder(Store.TxnPrewriteRequest prototype)
    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Store.TxnPrewriteRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static Store.TxnPrewriteRequest getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Store.TxnPrewriteRequest> parser()
    • getParserForType

      public com.google.protobuf.Parser<Store.TxnPrewriteRequest> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public Store.TxnPrewriteRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder