Class PersistentState.Options
Represents configuration options of the persistent audit trail.
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
public class PersistentState.Options
Properties
| Edit this page View SourceBackupFormat
Gets or sets compression level used to create backup archive.
Declaration
public TarEntryFormat BackupFormat { get; set; }
Property Value
Type | Description |
---|---|
TarEntryFormat |
BufferSize
Gets or sets size of in-memory buffer for I/O operations.
Declaration
public int BufferSize { get; set; }
Property Value
Type | Description |
---|---|
int |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
|
CopyOnReadOptions
If set then every read operations will be performed on buffered copy of the log entries.
Declaration
public LogEntriesBufferingOptions? CopyOnReadOptions { get; set; }
Property Value
Type | Description |
---|---|
LogEntriesBufferingOptions |
InitialPartitionSize
Gets or sets the initial size of the file that holds the partition with log entries, in bytes.
Declaration
public long InitialPartitionSize { get; set; }
Property Value
Type | Description |
---|---|
long |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
|
IntegrityCheck
Enables or disables integrity check of the internal WAL state.
Declaration
public bool IntegrityCheck { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
The default value is false for backward compatibility.
MaxConcurrentReads
Gets or sets the number of possible parallel reads.
Declaration
public int MaxConcurrentReads { get; set; }
Property Value
Type | Description |
---|---|
int |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
|
MaxLogEntrySize
Gets or sets maximum size of the log entry, in bytes.
Declaration
public long? MaxLogEntrySize { get; set; }
Property Value
Type | Description |
---|---|
long? |
Remarks
If enabled, WAL uses sparse files to optimize performance.
CreateBackupAsync(Stream, CancellationToken) method supports backup of sparse
files on Linux only. RestoreFromBackupAsync(Stream, DirectoryInfo, CancellationToken)
method cannot restore the backup, you need to use tar
utility to extract files.
MeasurementTags
Gets or sets a list of tags to be associated with each measurement.
Declaration
[CLSCompliant(false)]
public TagList MeasurementTags { get; set; }
Property Value
Type | Description |
---|---|
TagList |
ParallelIO
Gets or sets a value indicating that the underlying storage device can perform read/write operations simultaneously.
Declaration
public bool ParallelIO { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This parameter makes no sense if UseCaching is true. If caching is disabled, set this property to true if the underlying storage is attached using parallel interface such as NVMe (via PCIe bus). The default value is false.
UseCaching
Enables or disables in-memory cache.
Declaration
public bool UseCaching { get; set; }
Property Value
Type | Description |
---|---|
bool | true to in-memory cache for faster read/write of log entries; false to reduce the memory by the cost of the performance. |
UseLegacyBinaryFormat
Gets or sets a value indicating that legacy binary format must be used.
Declaration
[Obsolete("Use default format instead.")]
public bool UseLegacyBinaryFormat { get; set; }
Property Value
Type | Description |
---|---|
bool |
WriteMode
Gets or sets a value indicating how the log interacts with underlying storage device.
Declaration
public PersistentState.WriteMode WriteMode { get; set; }
Property Value
Type | Description |
---|---|
PersistentState.WriteMode |
Methods
| Edit this page View SourceGetMemoryAllocator<T>()
Gets memory allocator for internal purposes.
Declaration
public virtual MemoryAllocator<T> GetMemoryAllocator<T>()
Returns
Type | Description |
---|---|
MemoryAllocator<T> | The memory allocator. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the pool. |