Class MemoryBasedStateMachine.SnapshotBuilder
Represents snapshot builder.
Inheritance
MemoryBasedStateMachine.SnapshotBuilder
Implements
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
protected abstract class MemoryBasedStateMachine.SnapshotBuilder : Disposable, IDisposable
Methods
| Edit this page View SourceAdjustIndex(long, long, ref long)
Allows to adjust the index of the current log entry to be snapshotted.
Declaration
protected virtual void AdjustIndex(long startIndex, long endIndex, ref long currentIndex)
Parameters
Type | Name | Description |
---|---|---|
long | startIndex | The lower bound of the index, inclusive. |
long | endIndex | The upper bound of the index, inclusive. |
long | currentIndex | The currently running index. |
Remarks
If currentIndex
is modified in a way when it out of bounds
then snapshot process will be terminated immediately. Moreover,
compaction algorithm is optimized for monotonic growth of this index.
Stepping back or random access may slow down the process.
ApplyAsync(LogEntry)
Interprets the command specified by the log entry.
Declaration
protected abstract ValueTask ApplyAsync(PersistentState.LogEntry entry)
Parameters
Type | Name | Description |
---|---|---|
PersistentState.LogEntry | entry | The committed log entry. |
Returns
Type | Description |
---|---|
ValueTask | The task representing asynchronous execution of this method. |