Interface ISnapshotManager
Represents incremental snapshot manager.
Namespace: DotNext.Net.Cluster.Consensus.Raft.StateMachine
Assembly: DotNext.Net.Cluster.dll
Syntax
public interface ISnapshotManager
Properties
| Edit this page View SourceSnapshot
Takes the currently maintaining snapshot.
Declaration
ISnapshot? Snapshot { get; }
Property Value
Type | Description |
---|---|
ISnapshot | The currently maintaining snapshot; or |
Remarks
This method should be idempotent.
Methods
| Edit this page View SourceReclaimGarbageAsync(long, CancellationToken)
Removes old snapshot versions stored on the disk.
Declaration
ValueTask ReclaimGarbageAsync(long watermark, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
long | watermark | The index of the snapshot is known as the latest snapshot. |
CancellationToken | token | The token that can be used to cancel the operation. |
Returns
Type | Description |
---|---|
ValueTask | The task representing asynchronous execution of the method. |
Remarks
The implementation can safely delete all the snapshot versions of the indices less than
watermark
. The infrastructure guarantees that no one reader can
get the snapshot of the index less than watermark
.
Exceptions
Type | Condition |
---|---|
OperationCanceledException | The operation has been canceled. |