Append(T)
abstract
public abstract long Append(T item) Appends an entry to the log.
Parameters
itemT- The entry.
Returns
The entry's sequence number.
Exceptions
System.InvalidOperationException- The log is sealed.
public abstract long Append(T item)itemTSystem.InvalidOperationExceptionpublic abstract IDurableLogDraft<T> BeginDraft()System.InvalidOperationExceptionpublic abstract void Clear()System.InvalidOperationExceptionpublic abstract IAsyncEnumerable<LogEvent<T>> ReadAsync(long fromSequence = 0, long epoch = 0, bool includeDrafts = false, LogDraftId? resumeDraftId = null, CancellationToken cancellationToken = default(CancellationToken))fromSequencelongepochlongfromSequence belongs to, from Orleans.Durable.Journaling.LogEvent.Epoch, or zero to read the current history. When the epoch differs from Orleans.Durable.Journaling.IDurableLog.Epoch, the stream begins with LogEventKind. includeDraftsboolLogEventKind, LogEventKind, and LogEventKind. resumeDraftIdLogDraftId?LogEventKind with the entries which replaced it, in any activation, while the log retains the first of those entries. When it closed in this activation without committing, the stream reports LogEventKind with its LogDraftAbandonReason. Otherwise, the stream reports LogDraftAbandonReason for a draft opened by another activation and LogDraftAbandonReason for a draft of this activation. cancellationTokenCancellationTokenincludeDrafts is true, the stream also delivers draft items as they are written, and reports a committed draft once the entries which replaced it are durable. System.ArgumentOutOfRangeExceptionfromSequence or epoch is negative. System.InvalidOperationExceptionpublic abstract void Seal()public abstract void TrimBefore(long sequence)sequence. sequencelongSystem.ArgumentOutOfRangeExceptionsequence is negative or greater than Orleans.Durable.Journaling.IDurableLog.NextSequence.public abstract bool TryGet(long sequence, out T item)sequencelongitemTtrue if the log retains an entry with sequence; otherwise, false.