Skip to content

IDurableLogDraft<T> Methods

Streams volatile items to the readers of an Orleans.Durable.Journaling.IDurableLog which include drafts, until the draft commits durable entries or is abandoned.

Abandon(string?)

abstract
public abstract void Abandon(string? message = null)
Closes the draft without entries and reports LogEventKind with LogDraftAbandonReason.

Parameters

messagestring?
A description of the failure reported to readers in Orleans.Durable.Journaling.LogEvent.Message.

Commit(ReadOnlySpan<T>)

abstract
public abstract long Commit(params ReadOnlySpan<T> entries)
Closes the draft and appends the durable entries which replace its items.

Parameters

entriesReadOnlySpan<T>
The entries, in order. Pass none to close the draft cleanly without appending entries.

Returns

The sequence number of the first entry. When entries is empty, the sequence number which the next appended entry receives.

Exceptions

System.InvalidOperationException
The draft is closed. The message states why.

Write(T)

abstract
public abstract void Write(T item)
Writes a volatile item and delivers it to readers which include drafts.

Parameters

itemT
The item.

Exceptions

System.InvalidOperationException
The draft is closed. The message states why.