Show / Hide Table of Contents

Class WriteAheadLog.Options

Represents configuration options.

Inheritance
object
WriteAheadLog.Options
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: DotNext.Net.Cluster.Consensus.Raft.StateMachine
Assembly: DotNext.Net.Cluster.dll
Syntax
public class WriteAheadLog.Options

Constructors

View Source

Options()

Declaration
public Options()

Properties

View Source

Allocator

Gets or sets the memory allocator.

Declaration
public MemoryAllocator<byte>? Allocator { get; init; }
Property Value
Type Description
MemoryAllocator<byte>
View Source

ChunkSize

Gets or sets the maximum size of the single chunk file, in bytes.

Declaration
public int ChunkSize { get; init; }
Property Value
Type Description
int
Remarks

The property cannot be changed for existing WAL.

Exceptions
Type Condition
ArgumentOutOfRangeException

value is less than or equal to zero.

View Source

ConcurrencyLevel

Gets or sets an expected number of concurrent users of the log.

Declaration
public int ConcurrencyLevel { get; init; }
Property Value
Type Description
int
Exceptions
Type Condition
ArgumentOutOfRangeException

value is less than or equal to zero.

View Source

FlushInterval

Gets or sets the interval of the checkpoint.

Declaration
public TimeSpan FlushInterval { get; init; }
Property Value
Type Description
TimeSpan

Use InfiniteTimeSpan to disable automatic checkpoints. The checkpoint must be triggered manually by calling FlushAsync(CancellationToken) method. Use Zero to enable automatic checkpoint on every commit. Otherwise, the checkpoint is produced every specified time interval.

View Source

HashAlgorithm

Gets or sets the hash algorithm for the log integrity control.

Declaration
public WriteAheadLog.IntegrityHashAlgorithm HashAlgorithm { get; init; }
Property Value
Type Description
WriteAheadLog.IntegrityHashAlgorithm
Remarks

Once WAL created, the hash algorithm should not be changed. However, it's possible to migrate log entries to a different log with modified or disabled hash algorithm with ImportAsync(WriteAheadLog, CancellationToken) method.

Exceptions
Type Condition
ArgumentOutOfRangeException

The hash algorithm is not supported.

View Source

Location

Gets or sets the path to the root folder to be used by the log to persist log entries.

Declaration
[Required]
public required string Location { get; init; }
Property Value
Type Description
string
Exceptions
Type Condition
ArgumentOutOfRangeException
View Source

MeasurementTags

Gets or sets a list of tags to be associated with each measurement.

Declaration
[CLSCompliant(false)]
public TagList MeasurementTags { get; init; }
Property Value
Type Description
TagList
View Source

MemoryManagement

Gets or sets the memory management strategy.

Declaration
public WriteAheadLog.MemoryManagementStrategy MemoryManagement { get; init; }
Property Value
Type Description
WriteAheadLog.MemoryManagementStrategy

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾