Struct WriteAheadLog.LogEntryReader
Represents a reader of the log entries;
Implements
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft.StateMachine
Assembly: DotNext.Net.Cluster.dll
Syntax
public readonly struct WriteAheadLog.LogEntryReader : IReadOnlyList<LogEntry>, IReadOnlyCollection<LogEntry>, IEnumerable<LogEntry>, IEnumerable, IDisposable
Remarks
The caller must dispose the reader to inform the WAL that the entries are subjects for garbage collection.
Properties
View SourceCount
Gets the number of log entries in the collection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
this[int]
Gets the log entry by index.
Declaration
public LogEntry this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index of the log entry within the collection. |
Property Value
| Type | Description |
|---|---|
| LogEntry |
Methods
View SourceDispose()
Informs WAL that the reader is no longer used.
Declaration
public void Dispose()
GetEnumerator()
Gets the enumerator over the log entries.
Declaration
public IEnumerator<LogEntry> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<LogEntry> | The enumerator over the log entries. |