-
-
-
Serialized Fields
-
expiryInSeconds
Integer expiryInSeconds
The time before expiry.The time unit is second.
-
lockOwner
String lockOwner
lockOwner 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.
-
resourceId
String resourceId
Required. resourceId is the lock key. e.g. `order_id_111`
It stands for "which resource I want to protect"
-
storeName
String storeName
The lock store name,e.g. `redis`.
-
class StateOptionDurationDeserializer extends com.fasterxml.jackson.databind.deser.std.StdDeserializer<
Duration> implements
Serializable
-
class StateOptionDurationSerializer extends com.fasterxml.jackson.databind.ser.std.StdSerializer<
Duration> implements
Serializable
-
-
Serialized Fields
-
lockOwner
String lockOwner
lockOwner 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.
-
resourceId
String resourceId
Required. resourceId is the lock key. e.g. `order_id_111`
It stands for "which resource I want to protect"
-
storeName
String storeName
The lock store name,e.g. `redis`.
-
-
-
Serialized Fields
-
errorCode
String errorCode
Dapr's error code for this exception.
-
errorDetails
DaprErrorDetails errorDetails
The status details for the error.
-
payload
byte[] payload
Optional payload, if the exception came from a response body.