Class MemoryBasedStateMachine.InlineSnapshotBuilder
Represents a snapshot builder that allows to write directly to the snapshot file using RandomAccess class.
Inheritance
MemoryBasedStateMachine.InlineSnapshotBuilder
Implements
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
protected abstract class MemoryBasedStateMachine.InlineSnapshotBuilder : MemoryBasedStateMachine.SnapshotBuilder, IDisposable
Constructors
| Edit this page View SourceInlineSnapshotBuilder(in SnapshotBuilderContext)
Initializes a new snapshot builder.
Declaration
protected InlineSnapshotBuilder(in MemoryBasedStateMachine.SnapshotBuilderContext context)
Parameters
Type | Name | Description |
---|---|---|
MemoryBasedStateMachine.SnapshotBuilderContext | context | The context of the snapshot builder. |
Properties
| Edit this page View SourceSnapshotFileHandle
Gets the file descriptor pointing to the snapshot file.
Declaration
protected SafeFileHandle SnapshotFileHandle { get; }
Property Value
Type | Description |
---|---|
SafeFileHandle |
Methods
| Edit this page View SourceFlushAsync()
Flushes the data to the snapshot file.
Declaration
protected virtual ValueTask<long> FlushAsync()
Returns
Type | Description |
---|---|
ValueTask<long> | The size of the snapshot, in bytes. It can be less than the size of the file. |
InitializeAsync()
Initializes the builder.
Declaration
protected virtual ValueTask InitializeAsync()
Returns
Type | Description |
---|---|
ValueTask | The task representing asynchronous result. |