Class Store.TxnPrewriteResponse

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

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

    • RESPONSE_INFO_FIELD_NUMBER

      public static final int RESPONSE_INFO_FIELD_NUMBER
      See Also:
    • ERROR_FIELD_NUMBER

      public static final int ERROR_FIELD_NUMBER
      See Also:
    • TXN_RESULT_FIELD_NUMBER

      public static final int TXN_RESULT_FIELD_NUMBER
      See Also:
    • KEYS_ALREADY_EXIST_FIELD_NUMBER

      public static final int KEYS_ALREADY_EXIST_FIELD_NUMBER
      See Also:
    • ONE_PC_COMMIT_TS_FIELD_NUMBER

      public static final int ONE_PC_COMMIT_TS_FIELD_NUMBER
      See Also:
    • MIN_COMMIT_TS_FIELD_NUMBER

      public static final int MIN_COMMIT_TS_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
    • hasResponseInfo

      public boolean hasResponseInfo()
       response info
       
      .dingodb.pb.common.ResponseInfo response_info = 1;
      Specified by:
      hasResponseInfo in interface Store.TxnPrewriteResponseOrBuilder
      Returns:
      Whether the responseInfo field is set.
    • getResponseInfo

      public Common.ResponseInfo getResponseInfo()
       response info
       
      .dingodb.pb.common.ResponseInfo response_info = 1;
      Specified by:
      getResponseInfo in interface Store.TxnPrewriteResponseOrBuilder
      Returns:
      The responseInfo.
    • getResponseInfoOrBuilder

      public Common.ResponseInfoOrBuilder getResponseInfoOrBuilder()
       response info
       
      .dingodb.pb.common.ResponseInfo response_info = 1;
      Specified by:
      getResponseInfoOrBuilder in interface Store.TxnPrewriteResponseOrBuilder
    • hasError

      public boolean hasError()
       error code
       
      .dingodb.pb.error.Error error = 2;
      Specified by:
      hasError in interface Store.TxnPrewriteResponseOrBuilder
      Returns:
      Whether the error field is set.
    • getError

      public ErrorOuterClass.Error getError()
       error code
       
      .dingodb.pb.error.Error error = 2;
      Specified by:
      getError in interface Store.TxnPrewriteResponseOrBuilder
      Returns:
      The error.
    • getErrorOrBuilder

      public ErrorOuterClass.ErrorOrBuilder getErrorOrBuilder()
       error code
       
      .dingodb.pb.error.Error error = 2;
      Specified by:
      getErrorOrBuilder in interface Store.TxnPrewriteResponseOrBuilder
    • getTxnResultList

      public List<Store.TxnResultInfo> getTxnResultList()
       for prewrite, txn_result will be one of the following:
       1. LockInfo: prewrite meet a lock and can't proceed, the lock is returned
       2. WriteConflict: Write conflict with key which is already written after start_ts
          2.1 Optimistic: in optimistic transactions.
          2.2 SelfRolledBack: the transaction itself has been rolled back when it tries to prewrite.
       3. otherwise, txn_result is empty
       for success prewrite, txn_result is empty
       for failure prewrite, txn_result is not empty
       if there is a WriteConflict in txn_result, client should backoff or cleanup the lock then retry
       
      repeated .dingodb.pb.store.TxnResultInfo txn_result = 3;
      Specified by:
      getTxnResultList in interface Store.TxnPrewriteResponseOrBuilder
    • getTxnResultOrBuilderList

      public List<? extends Store.TxnResultInfoOrBuilder> getTxnResultOrBuilderList()
       for prewrite, txn_result will be one of the following:
       1. LockInfo: prewrite meet a lock and can't proceed, the lock is returned
       2. WriteConflict: Write conflict with key which is already written after start_ts
          2.1 Optimistic: in optimistic transactions.
          2.2 SelfRolledBack: the transaction itself has been rolled back when it tries to prewrite.
       3. otherwise, txn_result is empty
       for success prewrite, txn_result is empty
       for failure prewrite, txn_result is not empty
       if there is a WriteConflict in txn_result, client should backoff or cleanup the lock then retry
       
      repeated .dingodb.pb.store.TxnResultInfo txn_result = 3;
      Specified by:
      getTxnResultOrBuilderList in interface Store.TxnPrewriteResponseOrBuilder
    • getTxnResultCount

      public int getTxnResultCount()
       for prewrite, txn_result will be one of the following:
       1. LockInfo: prewrite meet a lock and can't proceed, the lock is returned
       2. WriteConflict: Write conflict with key which is already written after start_ts
          2.1 Optimistic: in optimistic transactions.
          2.2 SelfRolledBack: the transaction itself has been rolled back when it tries to prewrite.
       3. otherwise, txn_result is empty
       for success prewrite, txn_result is empty
       for failure prewrite, txn_result is not empty
       if there is a WriteConflict in txn_result, client should backoff or cleanup the lock then retry
       
      repeated .dingodb.pb.store.TxnResultInfo txn_result = 3;
      Specified by:
      getTxnResultCount in interface Store.TxnPrewriteResponseOrBuilder
    • getTxnResult

      public Store.TxnResultInfo getTxnResult(int index)
       for prewrite, txn_result will be one of the following:
       1. LockInfo: prewrite meet a lock and can't proceed, the lock is returned
       2. WriteConflict: Write conflict with key which is already written after start_ts
          2.1 Optimistic: in optimistic transactions.
          2.2 SelfRolledBack: the transaction itself has been rolled back when it tries to prewrite.
       3. otherwise, txn_result is empty
       for success prewrite, txn_result is empty
       for failure prewrite, txn_result is not empty
       if there is a WriteConflict in txn_result, client should backoff or cleanup the lock then retry
       
      repeated .dingodb.pb.store.TxnResultInfo txn_result = 3;
      Specified by:
      getTxnResult in interface Store.TxnPrewriteResponseOrBuilder
    • getTxnResultOrBuilder

      public Store.TxnResultInfoOrBuilder getTxnResultOrBuilder(int index)
       for prewrite, txn_result will be one of the following:
       1. LockInfo: prewrite meet a lock and can't proceed, the lock is returned
       2. WriteConflict: Write conflict with key which is already written after start_ts
          2.1 Optimistic: in optimistic transactions.
          2.2 SelfRolledBack: the transaction itself has been rolled back when it tries to prewrite.
       3. otherwise, txn_result is empty
       for success prewrite, txn_result is empty
       for failure prewrite, txn_result is not empty
       if there is a WriteConflict in txn_result, client should backoff or cleanup the lock then retry
       
      repeated .dingodb.pb.store.TxnResultInfo txn_result = 3;
      Specified by:
      getTxnResultOrBuilder in interface Store.TxnPrewriteResponseOrBuilder
    • getKeysAlreadyExistList

      public List<Store.AlreadyExist> getKeysAlreadyExistList()
       if there is PutIfAbsent in mutation, and if there is key conflict, the conflict key will be returned
       
      repeated .dingodb.pb.store.AlreadyExist keys_already_exist = 4;
      Specified by:
      getKeysAlreadyExistList in interface Store.TxnPrewriteResponseOrBuilder
    • getKeysAlreadyExistOrBuilderList

      public List<? extends Store.AlreadyExistOrBuilder> getKeysAlreadyExistOrBuilderList()
       if there is PutIfAbsent in mutation, and if there is key conflict, the conflict key will be returned
       
      repeated .dingodb.pb.store.AlreadyExist keys_already_exist = 4;
      Specified by:
      getKeysAlreadyExistOrBuilderList in interface Store.TxnPrewriteResponseOrBuilder
    • getKeysAlreadyExistCount

      public int getKeysAlreadyExistCount()
       if there is PutIfAbsent in mutation, and if there is key conflict, the conflict key will be returned
       
      repeated .dingodb.pb.store.AlreadyExist keys_already_exist = 4;
      Specified by:
      getKeysAlreadyExistCount in interface Store.TxnPrewriteResponseOrBuilder
    • getKeysAlreadyExist

      public Store.AlreadyExist getKeysAlreadyExist(int index)
       if there is PutIfAbsent in mutation, and if there is key conflict, the conflict key will be returned
       
      repeated .dingodb.pb.store.AlreadyExist keys_already_exist = 4;
      Specified by:
      getKeysAlreadyExist in interface Store.TxnPrewriteResponseOrBuilder
    • getKeysAlreadyExistOrBuilder

      public Store.AlreadyExistOrBuilder getKeysAlreadyExistOrBuilder(int index)
       if there is PutIfAbsent in mutation, and if there is key conflict, the conflict key will be returned
       
      repeated .dingodb.pb.store.AlreadyExist keys_already_exist = 4;
      Specified by:
      getKeysAlreadyExistOrBuilder in interface Store.TxnPrewriteResponseOrBuilder
    • getOnePcCommitTs

      public long getOnePcCommitTs()
       When the transaction is successfully committed with 1PC protocol, this
       field will be set to the commit ts of the transaction. Otherwise, if dingo-store
       failed to commit it with 1PC or the transaction is not 1PC, the value will
       be 0.
       
      int64 one_pc_commit_ts = 5;
      Specified by:
      getOnePcCommitTs in interface Store.TxnPrewriteResponseOrBuilder
      Returns:
      The onePcCommitTs.
    • getMinCommitTs

      public long getMinCommitTs()
       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 = 6;
      Specified by:
      getMinCommitTs in interface Store.TxnPrewriteResponseOrBuilder
      Returns:
      The minCommitTs.
    • 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.TxnPrewriteResponse parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

      public static Store.TxnPrewriteResponse 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.TxnPrewriteResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static Store.TxnPrewriteResponse getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<Store.TxnPrewriteResponse> 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.TxnPrewriteResponse getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder