Skip to content

VolatileJournalStorage.UpdateMetadataAsync(IReadOnlyDictionary<string, string>, IEnumerable<string>, string?, CancellationToken)

UpdateMetadataAsync(IReadOnlyDictionary<string, string>, IEnumerable<string>, string?, CancellationToken)

View source
public ValueTask<IJournalMetadata?> UpdateMetadataAsync(IReadOnlyDictionary<string, string>? set = null, IEnumerable<string>? remove = null, string? expectedETag = null, CancellationToken cancellationToken = default(CancellationToken))
Conditionally updates caller-owned metadata properties.

Parameters

setIReadOnlyDictionary<string, string>
Metadata properties to set.
removeIEnumerable<string>
Metadata properties to remove.
expectedETagstring?
The expected metadata ETag, or null for an unconditional update.
cancellationTokenCancellationToken
The cancellation token.

Returns

The current metadata if the update was applied or made no changes; otherwise, null.