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
[Obsolete("This property has no effect. WAL uses automatic checkpoint on every commit to ensure consistency.")]
public TimeSpan FlushInterval { get; init; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
FlushOnCommit
Gets or sets a value indicating that every appended or committed log entry must be flushed to disk before CommitAsync(long, CancellationToken) method returns.
Declaration
[Obsolete("This property is always true.")]
public bool FlushOnCommit { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
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 |
NoBuffering
Gets or sets a value indicating that pages should be flushed to disk with unbuffered (direct) I/O, bypassing the OS page cache.
Declaration
public bool NoBuffering { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
This flag is applicable only when MemoryManagement is PrivateMemory and only on Windows and Linux; it's ignored on other platforms and combinations.