Table of Contents

Method UpdateAsync

Namespace
NATS.Client.KeyValueStore
Assembly
NATS.Client.KeyValueStore.dll

UpdateAsync<T>(string, T, ulong, INatsSerialize<T>?, CancellationToken)

Update an entry in the bucket only if last update revision matches

ValueTask<ulong> UpdateAsync<T>(string key, T value, ulong revision, INatsSerialize<T>? serializer = null, CancellationToken cancellationToken = default)

Parameters

key string

Key of the entry

value T

Value of the entry

revision ulong

Last revision number to match

serializer INatsSerialize<T>

Serializer to use for the message type.

cancellationToken CancellationToken

A CancellationToken used to cancel the API call.

Returns

ValueTask<ulong>

The revision number of the updated entry

Type Parameters

T

Serialized value type