Package io.dapr.v1
Interface DaprProtos.TryLockRequestOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
DaprProtos.TryLockRequest
,DaprProtos.TryLockRequest.Builder
- Enclosing class:
- DaprProtos
public static interface DaprProtos.TryLockRequestOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionint
Required.Required.com.google.protobuf.ByteString
Required.Required.com.google.protobuf.ByteString
Required.Required.com.google.protobuf.ByteString
Required.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getStoreName
String getStoreName()Required. The lock store name,e.g. `redis`.
string store_name = 1 [json_name = "storeName"];
- Returns:
- The storeName.
-
getStoreNameBytes
com.google.protobuf.ByteString getStoreNameBytes()Required. The lock store name,e.g. `redis`.
string store_name = 1 [json_name = "storeName"];
- Returns:
- The bytes for storeName.
-
getResourceId
String getResourceId()Required. resource_id is the lock key. e.g. `order_id_111` It stands for "which resource I want to protect"
string resource_id = 2 [json_name = "resourceId"];
- Returns:
- The resourceId.
-
getResourceIdBytes
com.google.protobuf.ByteString getResourceIdBytes()Required. resource_id is the lock key. e.g. `order_id_111` It stands for "which resource I want to protect"
string resource_id = 2 [json_name = "resourceId"];
- Returns:
- The bytes for resourceId.
-
getLockOwner
String getLockOwner()Required. lock_owner indicate the identifier of lock owner. You can generate a uuid as lock_owner.For example,in golang: req.LockOwner = uuid.New().String() This field is per request,not per process,so it is different for each request, which aims to prevent multi-thread in the same process trying the same lock concurrently. The reason why we don't make it automatically generated is: 1. If it is automatically generated,there must be a 'my_lock_owner_id' field in the response. This name is so weird that we think it is inappropriate to put it into the api spec 2. If we change the field 'my_lock_owner_id' in the response to 'lock_owner',which means the current lock owner of this lock, we find that in some lock services users can't get the current lock owner.Actually users don't need it at all. 3. When reentrant lock is needed,the existing lock_owner is required to identify client and check "whether this client can reenter this lock". So this field in the request shouldn't be removed.
string lock_owner = 3 [json_name = "lockOwner"];
- Returns:
- The lockOwner.
-
getLockOwnerBytes
com.google.protobuf.ByteString getLockOwnerBytes()Required. lock_owner indicate the identifier of lock owner. You can generate a uuid as lock_owner.For example,in golang: req.LockOwner = uuid.New().String() This field is per request,not per process,so it is different for each request, which aims to prevent multi-thread in the same process trying the same lock concurrently. The reason why we don't make it automatically generated is: 1. If it is automatically generated,there must be a 'my_lock_owner_id' field in the response. This name is so weird that we think it is inappropriate to put it into the api spec 2. If we change the field 'my_lock_owner_id' in the response to 'lock_owner',which means the current lock owner of this lock, we find that in some lock services users can't get the current lock owner.Actually users don't need it at all. 3. When reentrant lock is needed,the existing lock_owner is required to identify client and check "whether this client can reenter this lock". So this field in the request shouldn't be removed.
string lock_owner = 3 [json_name = "lockOwner"];
- Returns:
- The bytes for lockOwner.
-
getExpiryInSeconds
int getExpiryInSeconds()Required. The time before expiry.The time unit is second.
int32 expiry_in_seconds = 4 [json_name = "expiryInSeconds"];
- Returns:
- The expiryInSeconds.
-