# IDurableLog&lt;T&gt;

Package: [Microsoft.Orleans.Durable](/orleans/docs/api/csharp/microsoft.orleans.durable/) 10.0.0-alpha.1

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/Journaling/IDurableLog.cs#L33)

```csharp
public interface IDurableLog<T> : IEnumerable<T>, IReadOnlyCollection<T>, IEnumerable
```

Represents an append-only, observable log whose entries are recorded in a journal.

## Remarks

Each appended entry receives the next value of a durable, monotonically increasing sequence number. Sequence numbers are never reused within a history: `Orleans.Durable.Journaling.IDurableLog-1.TrimBefore(System.Int64)` discards old entries while preserving the sequence, and `Orleans.Durable.Journaling.IDurableLog-1.Clear` replaces the log's entries after consuming one sequence number. Enumeration yields the retained entries in sequence order.

`Orleans.Durable.Journaling.IDurableLog-1.Epoch` identifies the history. Deleting the journal ends the history and restarts the sequence, and the next change begins a history with a new epoch. A reader position is therefore an epoch and a sequence number.

A draft streams volatile content to readers which include drafts before its durable entries exist. Use drafts for incremental output, such as model responses, whose final form is committed as one or more entries.

`Orleans.Durable.Journaling.IDurableLog-1.Seal` durably ends the log, so that readers' streams end after its final entry.

The log takes ownership of the entries and draft items passed to it, and the journal records each entry when it is appended. To change an entry's content, append a new entry.

## Type parameters

- `T`: The type of entries in the log.

## Properties

- [CommittedSequence](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/properties/committedsequence-ac9a33ab/)
- [Epoch](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/properties/epoch-dc9446dd/)
- [FirstSequence](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/properties/firstsequence-2e14c1b7/)
- [IsSealed](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/properties/issealed-7c9e4d6a/)
- [NextSequence](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/properties/nextsequence-e30f1e34/)

## Methods

- [Append(T)](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/methods/append-t-6e29e74e/)
- [BeginDraft](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/methods/begindraft-2fc02ba2/)
- [Clear](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/methods/clear-d850006a/)
- [ReadAsync(long, long, bool, LogDraftId?, CancellationToken)](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/methods/readasync-long-long-bool-orleans-durable-journaling-logdraftid-nullable-system-t-553513af/)
- [Seal](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/methods/seal-8305be66/)
- [TrimBefore(long)](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/methods/trimbefore-long-9fab0707/)
- [TryGet(long, T)](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/methods/tryget-long-out-t-fb50e718/)

## Indexers

- [this[long]](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/indexers/this-long-5b28d555/)
