Skip to content

VolatileJournalStorage.ReplaceAsync(ReadOnlySequence<byte>, CancellationToken)

ReplaceAsync(ReadOnlySequence<byte>, CancellationToken)

View source
public ValueTask ReplaceAsync(ReadOnlySequence<byte> snapshot, CancellationToken cancellationToken)
Replaces the journal with the provided value atomically.

Parameters

snapshotReadOnlySequence<byte>
The encoded journal bytes to write. The storage provider must not retain this buffer after the returned task completes.
cancellationTokenCancellationToken
The cancellation token.

Returns

A System.Threading.Tasks.ValueTask representing the operation.