UpdateAndRetainExclusiveAsync(TKey, TValue, LockToken, UpdatePolicy, IEnumerable<String>, CancellationToken)
Updates an existing object in the cache that is already locked by the caller, retaining the lock for subsequent locking operations.
public Task<CacheResponse<TKey, TValue>> UpdateAndRetainExclusiveAsync(TKey key, TValue value, LockToken lockToken, UpdatePolicy updatePolicy = null, IEnumerable<string> tags = null, CancellationToken cancellationToken = default(CancellationToken))
Identifier of the object in the cache.
Value to be stored in the cache.
A non-empty lock token that was acquired from an earlier locking call.
Policy changes to make to the object in the ScaleOut service. If null, the policy is left unchanged.
Collection of tags to associate with the object. All tags are replaced with the provided collection. Pass null to leave current tags in place. An empty collection clears current tags.
A token used to propagate notification that this operation should be canceled.
A CacheResponse<TKey, TValue> containing the outcome of the operation.
|Updated||The object was successfully updated and in the ScaleOut service and the exclusive lock was refreshed.|
|NotFound||The requested object was not found in the ScaleOut service.|
|LockLostError||The exclusive lock on the object was lost (typically due to a lock timeout) and another caller claimed it.|
Use the lock token on the response's LockToken property to perform subsequent operations under the lock.