Show / Hide Table of Contents

Struct BufferedLogEntryList

Represents log entry producer that allows to bufferize log entries from another producer.

Implements
IDisposable
IReadOnlyList<BufferedLogEntry>
IReadOnlyCollection<BufferedLogEntry>
IEnumerable<BufferedLogEntry>
IEnumerable
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
public readonly struct BufferedLogEntryList : IDisposable, IReadOnlyList<BufferedLogEntry>, IReadOnlyCollection<BufferedLogEntry>, IEnumerable<BufferedLogEntry>, IEnumerable
Remarks

This type is intended for developing transport-layer buffering and low level I/O optimizations when writing custom Write-Ahead Log. It's not recommended to use the type in the application code.

Properties

| Edit this page View Source

Count

Gets the number of buffered log entries.

Declaration
public int Count { get; }
Property Value
Type Description
int
| Edit this page View Source

this[int]

Gets buffered log entry by the index.

Declaration
public ref readonly BufferedLogEntry this[int index] { get; }
Parameters
Type Name Description
int index

The index of the log entry.

Property Value
Type Description
BufferedLogEntry

Methods

| Edit this page View Source

CopyAsync<TEntry>(ILogEntryProducer<TEntry>, LogEntriesBufferingOptions, CancellationToken)

Constructs bufferized copy of all log entries presented in the sequence.

Declaration
public static Task<BufferedLogEntryList> CopyAsync<TEntry>(ILogEntryProducer<TEntry> producer, LogEntriesBufferingOptions options, CancellationToken token = default) where TEntry : IRaftLogEntry
Parameters
Type Name Description
ILogEntryProducer<TEntry> producer

The sequence of log entries to be copied.

LogEntriesBufferingOptions options

Buffering options.

CancellationToken token

The token that can be used to cancel the operation.

Returns
Type Description
Task<BufferedLogEntryList>

The copy of the log entries.

Type Parameters
Name Description
TEntry

The type of the entry in the source sequence.

Exceptions
Type Condition
OperationCanceledException

The operation has been canceled.

| Edit this page View Source

CopyAsync<TEntry, TList>(TList, LogEntriesBufferingOptions, CancellationToken)

Constructs buffered copy of all log entries presented in the list.

Declaration
public static Task<BufferedLogEntryList> CopyAsync<TEntry, TList>(TList list, LogEntriesBufferingOptions options, CancellationToken token = default) where TEntry : IRaftLogEntry where TList : IReadOnlyList<TEntry>
Parameters
Type Name Description
TList list

The list of log entries to be copied.

LogEntriesBufferingOptions options

Buffering options.

CancellationToken token

The token that can be used to cancel the operation.

Returns
Type Description
Task<BufferedLogEntryList>

The copy of the log entries.

Type Parameters
Name Description
TEntry

The type of the entry in the source sequence.

TList

The type of the list of log entries.

Exceptions
Type Condition
OperationCanceledException

The operation has been canceled.

| Edit this page View Source

Dispose()

Releases all buffered log entries.

Declaration
public void Dispose()
| Edit this page View Source

ToProducer()

Creates asynchronous log entry producer from this list.

Declaration
public ILogEntryProducer<BufferedLogEntry> ToProducer()
Returns
Type Description
ILogEntryProducer<BufferedLogEntry>

The entry producer.

Implements

IDisposable
IReadOnlyList<T>
IReadOnlyCollection<T>
IEnumerable<T>
IEnumerable

Extension Methods

BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
Collection.ToAsyncEnumerator<TEnumerator, T>(TEnumerator, CancellationToken)
Collection.ToClassicEnumerator<TEnumerator, T>(TEnumerator)
Enumerator.Skip<TEnumerator, T>(ref TEnumerator, int)
ExpressionBuilder.Const<T>(T)
Collection.Append<T>(IEnumerable<T>, params T[])
Collection.Copy<T>(IEnumerable<T>, int, MemoryAllocator<T>?)
Collection.ElementAt<T>(IEnumerable<T>, int, out T)
Collection.FirstOrNone<T>(IEnumerable<T>)
Collection.ForEachAsync<T>(IEnumerable<T>, Func<T, CancellationToken, ValueTask>, CancellationToken)
Collection.ForEach<T>(IEnumerable<T>, Action<T>)
Collection.LastOrNone<T>(IEnumerable<T>)
Collection.Prepend<T>(IEnumerable<T>, params T[])
Collection.SequenceHashCode<T>(IEnumerable<T>, bool)
Collection.ToAsyncEnumerable<T>(IEnumerable<T>, bool)
Collection.ToString<T>(IEnumerable<T>, string, string)
Enumerator.GetAsyncEnumerator<T>(IEnumerable<T>, CancellationToken)
Collection.Convert<TInput, TOutput>(IReadOnlyCollection<TInput>, Converter<TInput, TOutput>)
List.Convert<TInput, TOutput>(IReadOnlyList<TInput>, Converter<TInput, TOutput>)
List.IndexerGetter<T>(IReadOnlyList<T>)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾