Skip to content

JournalBufferWriter Methods

Base class for in-memory journal buffers used to assemble a pending journal batch.

CreateJournalStreamWriter(JournalStreamId)

View source
public JournalStreamWriter CreateJournalStreamWriter(JournalStreamId streamId)
Creates a writer for entries belonging to streamId.

Parameters

streamIdJournalStreamId
The durable state id.

Returns

A journal stream writer for the specified state.

GetBuffer

View source
public ArcBuffer GetBuffer()
Gets a pinned snapshot of the accumulated journal bytes which are safe to persist.

Returns

An ArcBuffer containing the accumulated journal bytes. The caller owns and must dispose the returned buffer.

Reset

View source
public void Reset()
Clears all buffered data so the writer can be reused for another batch.