Show / Hide Table of Contents

Struct BufferedLogEntry

Represents buffered log entry.

Implements
IRaftLogEntry
ILogEntry
IDataTransferObject
IDisposable
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 BufferedLogEntry : IRaftLogEntry, ILogEntry, IDataTransferObject, IDisposable
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

IsSnapshot

Gets a value indicating whether the current log entry is a snapshot.

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

Length

Gets length of this log entry, in bytes.

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

Term

Gets Term value associated with the log entry.

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

Timestamp

Gets date/time of when log entry was created.

Declaration
public DateTimeOffset Timestamp { get; }
Property Value
Type Description
DateTimeOffset

Methods

| Edit this page View Source

CopyAsync<TEntry>(TEntry, LogEntryBufferingOptions, CancellationToken)

Constructs a copy of the specified log entry.

Declaration
public static ValueTask<BufferedLogEntry> CopyAsync<TEntry>(TEntry entry, LogEntryBufferingOptions options, CancellationToken token) where TEntry : IRaftLogEntry
Parameters
Type Name Description
TEntry entry

The log entry to be copied.

LogEntryBufferingOptions options

Buffering options.

CancellationToken token

The token that can be used to cancel the operation.

Returns
Type Description
ValueTask<BufferedLogEntry>

Buffered copy of entry.

Type Parameters
Name Description
TEntry

The type of the log entry to be copied.

Exceptions
Type Condition
OperationCanceledException

The operation has been canceled.

| Edit this page View Source

Dispose()

Releases all resources associated with the buffer.

Declaration
public void Dispose()

Implements

IRaftLogEntry
ILogEntry
IDataTransferObject
IDisposable

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)
DataTransferObject.ToByteArrayAsync<TObject>(TObject, MemoryAllocator<byte>?, CancellationToken)
DataTransferObject.ToMemoryAsync<TObject>(TObject, MemoryAllocator<byte>?, CancellationToken)
DataTransferObject.ToStringAsync<TObject>(TObject, Encoding, MemoryAllocator<byte>?, CancellationToken)
DataTransferObject.TransformAsync<TResult, TObject>(TObject, Func<IAsyncBinaryReader, CancellationToken, ValueTask<TResult>>, CancellationToken)
DataTransferObject.WriteToAsync<TObject>(TObject, IBufferWriter<byte>, CancellationToken)
DataTransferObject.WriteToAsync<TObject>(TObject, PipeWriter, long, CancellationToken)
DataTransferObject.WriteToAsync<TObject>(TObject, Stream, int, CancellationToken)
DataTransferObject.WriteToAsync<TObject>(TObject, Stream, Memory<byte>, CancellationToken)
ExpressionBuilder.Const<T>(T)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾