JournalBufferWriter
class
Namespace: Orleans.Journaling
Base class for in-memory journal buffers used to assemble a pending journal batch.
public abstract class JournalBufferWriter : IBufferWriter<byte>, IDisposableRemarks
Derived classes own physical entry framing. This base class owns the buffer and committed-length watermark so that callers can flush a committed prefix while another entry is being written. Buffers returned by
JournalBufferWriter are pinned, caller-owned snapshots which must remain valid for the caller's lifetime even if JournalBufferWriter or JournalBufferWriter is called before the caller disposes the returned buffer. Despite the name, this type does not perform storage I/O; it accumulates encoded journal entries until callers hand the buffer off to IJournalStorage. Methods
CreateJournalStreamWriter(JournalStreamId)Creates a writer for entries belonging tostreamId.DisposeReleases resources used by this writer.GetBufferGets a pinned snapshot of the accumulated journal bytes which are safe to persist.ResetClears all buffered data so the writer can be reused for another batch.
