Class WriteAheadLog.Options
Represents configuration options.
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft.StateMachine
Assembly: DotNext.Net.Cluster.dll
Syntax
public class WriteAheadLog.Options
Constructors
View SourceOptions()
Declaration
public Options()
Properties
View SourceAllocator
Gets or sets the memory allocator.
Declaration
public MemoryAllocator<byte>? Allocator { get; init; }
Property Value
| Type | Description |
|---|---|
| MemoryAllocator<byte> |
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 |
|
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 |
|
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. |
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. |
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 |
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 |
MemoryManagement
Gets or sets the memory management strategy.
Declaration
public WriteAheadLog.MemoryManagementStrategy MemoryManagement { get; init; }
Property Value
| Type | Description |
|---|---|
| WriteAheadLog.MemoryManagementStrategy |