Show / Hide Table of Contents

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 Source

Snapshot

Takes the currently maintaining snapshot.

Declaration
ISnapshot? Snapshot { get; }
Property Value
Type Description
ISnapshot

The currently maintaining snapshot; or if there is no snapshot.

Remarks

This method should be idempotent.

Methods

| Edit this page View Source

ReclaimGarbageAsync(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.

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.GetUserData<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
ExpressionBuilder.Const<T>(T)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, bool, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, bool, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan, CancellationToken)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾