Package io.dingodb.store
Class Store.TxnPessimisticLockRequest.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
io.dingodb.store.Store.TxnPessimisticLockRequest.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Store.TxnPessimisticLockRequestOrBuilder,Cloneable
- Enclosing class:
- Store.TxnPessimisticLockRequest
public static final class Store.TxnPessimisticLockRequest.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
implements Store.TxnPessimisticLockRequestOrBuilder
Lock a set of keys to prepare to write to them.Protobuf type
dingodb.pb.store.TxnPessimisticLockRequest-
Method Summary
Modifier and TypeMethodDescriptionaddAllMutations(Iterable<? extends Store.Mutation> values) In this case every `Op` of the mutations must be `PessimisticLock`.addMutations(int index, Store.Mutation value) In this case every `Op` of the mutations must be `PessimisticLock`.addMutations(int index, Store.Mutation.Builder builderForValue) In this case every `Op` of the mutations must be `PessimisticLock`.addMutations(Store.Mutation value) In this case every `Op` of the mutations must be `PessimisticLock`.addMutations(Store.Mutation.Builder builderForValue) In this case every `Op` of the mutations must be `PessimisticLock`.In this case every `Op` of the mutations must be `PessimisticLock`.addMutationsBuilder(int index) In this case every `Op` of the mutations must be `PessimisticLock`.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear().dingodb.pb.store.Context context = 2;clearField(com.google.protobuf.Descriptors.FieldDescriptor field) Each locking command in a pessimistic transaction has its own timestamp oracle.the lock's ttl is timestamp in milisecond, it's the absolute timestamp when the lock is expired.In this case every `Op` of the mutations must be `PessimisticLock`.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) bytes primary_lock = 4;.dingodb.pb.common.RequestInfo request_info = 1;If it is true, store will return values of the keys if no error, so executor can cache the values for later read in the same transaction.uint64 start_ts = 5;clone().dingodb.pb.store.Context context = 2;.dingodb.pb.store.Context context = 2;.dingodb.pb.store.Context context = 2;static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorlongEach locking command in a pessimistic transaction has its own timestamp oracle.longthe lock's ttl is timestamp in milisecond, it's the absolute timestamp when the lock is expired.getMutations(int index) In this case every `Op` of the mutations must be `PessimisticLock`.getMutationsBuilder(int index) In this case every `Op` of the mutations must be `PessimisticLock`.In this case every `Op` of the mutations must be `PessimisticLock`.intIn this case every `Op` of the mutations must be `PessimisticLock`.In this case every `Op` of the mutations must be `PessimisticLock`.getMutationsOrBuilder(int index) In this case every `Op` of the mutations must be `PessimisticLock`.List<? extends Store.MutationOrBuilder>In this case every `Op` of the mutations must be `PessimisticLock`.com.google.protobuf.ByteStringbytes primary_lock = 4;.dingodb.pb.common.RequestInfo request_info = 1;.dingodb.pb.common.RequestInfo request_info = 1;.dingodb.pb.common.RequestInfo request_info = 1;booleanIf it is true, store will return values of the keys if no error, so executor can cache the values for later read in the same transaction.longuint64 start_ts = 5;boolean.dingodb.pb.store.Context context = 2;boolean.dingodb.pb.common.RequestInfo request_info = 1;protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeContext(Store.Context value) .dingodb.pb.store.Context context = 2;mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) .dingodb.pb.common.RequestInfo request_info = 1;mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) removeMutations(int index) In this case every `Op` of the mutations must be `PessimisticLock`.setContext(Store.Context value) .dingodb.pb.store.Context context = 2;setContext(Store.Context.Builder builderForValue) .dingodb.pb.store.Context context = 2;setForUpdateTs(long value) Each locking command in a pessimistic transaction has its own timestamp oracle.setLockTtl(long value) the lock's ttl is timestamp in milisecond, it's the absolute timestamp when the lock is expired.setMutations(int index, Store.Mutation value) In this case every `Op` of the mutations must be `PessimisticLock`.setMutations(int index, Store.Mutation.Builder builderForValue) In this case every `Op` of the mutations must be `PessimisticLock`.setPrimaryLock(com.google.protobuf.ByteString value) bytes primary_lock = 4;setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setRequestInfo(Common.RequestInfo value) .dingodb.pb.common.RequestInfo request_info = 1;setRequestInfo(Common.RequestInfo.Builder builderForValue) .dingodb.pb.common.RequestInfo request_info = 1;setReturnValues(boolean value) If it is true, store will return values of the keys if no error, so executor can cache the values for later read in the same transaction.setStartTs(long value) uint64 start_ts = 5;setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
-
setField
public Store.TxnPessimisticLockRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
-
clearField
public Store.TxnPessimisticLockRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) - Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
-
clearOneof
public Store.TxnPessimisticLockRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) - Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
-
setRepeatedField
public Store.TxnPessimisticLockRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
-
addRepeatedField
public Store.TxnPessimisticLockRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Store.TxnPessimisticLockRequest.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
-
mergeFrom
public Store.TxnPessimisticLockRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Store.TxnPessimisticLockRequest.Builder>- Throws:
IOException
-
hasRequestInfo
public boolean hasRequestInfo().dingodb.pb.common.RequestInfo request_info = 1;- Specified by:
hasRequestInfoin interfaceStore.TxnPessimisticLockRequestOrBuilder- Returns:
- Whether the requestInfo field is set.
-
getRequestInfo
.dingodb.pb.common.RequestInfo request_info = 1;- Specified by:
getRequestInfoin interfaceStore.TxnPessimisticLockRequestOrBuilder- Returns:
- The requestInfo.
-
setRequestInfo
.dingodb.pb.common.RequestInfo request_info = 1; -
setRequestInfo
public Store.TxnPessimisticLockRequest.Builder setRequestInfo(Common.RequestInfo.Builder builderForValue) .dingodb.pb.common.RequestInfo request_info = 1; -
mergeRequestInfo
.dingodb.pb.common.RequestInfo request_info = 1; -
clearRequestInfo
.dingodb.pb.common.RequestInfo request_info = 1; -
getRequestInfoBuilder
.dingodb.pb.common.RequestInfo request_info = 1; -
getRequestInfoOrBuilder
.dingodb.pb.common.RequestInfo request_info = 1;- Specified by:
getRequestInfoOrBuilderin interfaceStore.TxnPessimisticLockRequestOrBuilder
-
hasContext
public boolean hasContext().dingodb.pb.store.Context context = 2;- Specified by:
hasContextin interfaceStore.TxnPessimisticLockRequestOrBuilder- Returns:
- Whether the context field is set.
-
getContext
.dingodb.pb.store.Context context = 2;- Specified by:
getContextin interfaceStore.TxnPessimisticLockRequestOrBuilder- Returns:
- The context.
-
setContext
.dingodb.pb.store.Context context = 2; -
setContext
.dingodb.pb.store.Context context = 2; -
mergeContext
.dingodb.pb.store.Context context = 2; -
clearContext
.dingodb.pb.store.Context context = 2; -
getContextBuilder
.dingodb.pb.store.Context context = 2; -
getContextOrBuilder
.dingodb.pb.store.Context context = 2;- Specified by:
getContextOrBuilderin interfaceStore.TxnPessimisticLockRequestOrBuilder
-
getMutationsList
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3;- Specified by:
getMutationsListin interfaceStore.TxnPessimisticLockRequestOrBuilder
-
getMutationsCount
public int getMutationsCount()In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3;- Specified by:
getMutationsCountin interfaceStore.TxnPessimisticLockRequestOrBuilder
-
getMutations
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3;- Specified by:
getMutationsin interfaceStore.TxnPessimisticLockRequestOrBuilder
-
setMutations
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
setMutations
public Store.TxnPessimisticLockRequest.Builder setMutations(int index, Store.Mutation.Builder builderForValue) In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
addMutations
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
addMutations
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
addMutations
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
addMutations
public Store.TxnPessimisticLockRequest.Builder addMutations(int index, Store.Mutation.Builder builderForValue) In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
addAllMutations
public Store.TxnPessimisticLockRequest.Builder addAllMutations(Iterable<? extends Store.Mutation> values) In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
clearMutations
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
removeMutations
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
getMutationsBuilder
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
getMutationsOrBuilder
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3;- Specified by:
getMutationsOrBuilderin interfaceStore.TxnPessimisticLockRequestOrBuilder
-
getMutationsOrBuilderList
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3;- Specified by:
getMutationsOrBuilderListin interfaceStore.TxnPessimisticLockRequestOrBuilder
-
addMutationsBuilder
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
addMutationsBuilder
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
getMutationsBuilderList
In this case every `Op` of the mutations must be `PessimisticLock`.
repeated .dingodb.pb.store.Mutation mutations = 3; -
getPrimaryLock
public com.google.protobuf.ByteString getPrimaryLock()bytes primary_lock = 4;- Specified by:
getPrimaryLockin interfaceStore.TxnPessimisticLockRequestOrBuilder- Returns:
- The primaryLock.
-
setPrimaryLock
bytes primary_lock = 4;- Parameters:
value- The primaryLock to set.- Returns:
- This builder for chaining.
-
clearPrimaryLock
bytes primary_lock = 4;- Returns:
- This builder for chaining.
-
getStartTs
public long getStartTs()uint64 start_ts = 5;- Specified by:
getStartTsin interfaceStore.TxnPessimisticLockRequestOrBuilder- Returns:
- The startTs.
-
setStartTs
uint64 start_ts = 5;- Parameters:
value- The startTs to set.- Returns:
- This builder for chaining.
-
clearStartTs
uint64 start_ts = 5;- Returns:
- This builder for chaining.
-
getLockTtl
public long getLockTtl()the lock's ttl is timestamp in milisecond, it's the absolute timestamp when the lock is expired.
uint64 lock_ttl = 6;- Specified by:
getLockTtlin interfaceStore.TxnPessimisticLockRequestOrBuilder- Returns:
- The lockTtl.
-
setLockTtl
the lock's ttl is timestamp in milisecond, it's the absolute timestamp when the lock is expired.
uint64 lock_ttl = 6;- Parameters:
value- The lockTtl to set.- Returns:
- This builder for chaining.
-
clearLockTtl
the lock's ttl is timestamp in milisecond, it's the absolute timestamp when the lock is expired.
uint64 lock_ttl = 6;- Returns:
- This builder for chaining.
-
getForUpdateTs
public long getForUpdateTs()Each locking command in a pessimistic transaction has its own timestamp oracle. If locking fails, then the corresponding SQL statement can be retried with a later timestamp oracle, Executor 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 oracle.
uint64 for_update_ts = 7;- Specified by:
getForUpdateTsin interfaceStore.TxnPessimisticLockRequestOrBuilder- Returns:
- The forUpdateTs.
-
setForUpdateTs
Each locking command in a pessimistic transaction has its own timestamp oracle. If locking fails, then the corresponding SQL statement can be retried with a later timestamp oracle, Executor 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 oracle.
uint64 for_update_ts = 7;- Parameters:
value- The forUpdateTs to set.- Returns:
- This builder for chaining.
-
clearForUpdateTs
Each locking command in a pessimistic transaction has its own timestamp oracle. If locking fails, then the corresponding SQL statement can be retried with a later timestamp oracle, Executor 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 oracle.
uint64 for_update_ts = 7;- Returns:
- This builder for chaining.
-
getReturnValues
public boolean getReturnValues()If it is true, store will return values of the keys if no error, so executor can cache the values for later read in the same transaction.
bool return_values = 8;- Specified by:
getReturnValuesin interfaceStore.TxnPessimisticLockRequestOrBuilder- Returns:
- The returnValues.
-
setReturnValues
If it is true, store will return values of the keys if no error, so executor can cache the values for later read in the same transaction.
bool return_values = 8;- Parameters:
value- The returnValues to set.- Returns:
- This builder for chaining.
-
clearReturnValues
If it is true, store will return values of the keys if no error, so executor can cache the values for later read in the same transaction.
bool return_values = 8;- Returns:
- This builder for chaining.
-
setUnknownFields
public final Store.TxnPessimisticLockRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
-
mergeUnknownFields
public final Store.TxnPessimisticLockRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Store.TxnPessimisticLockRequest.Builder>
-