Skip to content

JsonDurableLogCommandCodec<T>.WriteSnapshot(long, long, long, bool, IReadOnlyCollection<T>, IReadOnlyCollection<LogDraftCommit>, JournalStreamWriter)

WriteSnapshot(long, long, long, bool, IReadOnlyCollection<T>, IReadOnlyCollection<LogDraftCommit>, JournalStreamWriter)

View source
public void WriteSnapshot(long epoch, long firstSequence, long resetSequence, bool isSealed, IReadOnlyCollection<T> items, IReadOnlyCollection<LogDraftCommit> draftCommits, JournalStreamWriter writer)
Writes a snapshot command containing the log's state and its retained entries, which begin at firstSequence.

Parameters

epochlong
The identifier of the log's history, or zero when the log has no history.
firstSequencelong
The sequence number of the first retained entry.
resetSequencelong
The first sequence number after the most recent clear, or zero.
isSealedbool
Whether the log is sealed.
itemsIReadOnlyCollection<T>
The retained entries.
draftCommitsIReadOnlyCollection<LogDraftCommit>
The drafts whose committed entries begin at or after firstSequence, in sequence order.
writerJournalStreamWriter
The writer.