Class PersistentState.SnapshotBuilder
Represents snapshot builder.
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
protected abstract class SnapshotBuilder : Disposable, IDisposable, IRaftLogEntry, Log.ILogEntry
Constructors
| Improve this Doc View SourceSnapshotBuilder()
Initializes a new snapshot builder.
Declaration
protected SnapshotBuilder()
Methods
| Improve this Doc View SourceApplyAsync(PersistentState.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. |
WriteToAsync<TWriter>(TWriter, CancellationToken)
Serializes the snapshotted entry.
Declaration
public abstract ValueTask WriteToAsync<TWriter>(TWriter writer, CancellationToken token)
where TWriter : IAsyncBinaryWriter
Parameters
Type | Name | Description |
---|---|---|
TWriter | writer | The binary writer. |
CancellationToken | token | The token that can be used to cancel the operation. |
Returns
Type | Description |
---|---|
ValueTask | The task representing state of asynchronous execution. |
Type Parameters
Name | Description |
---|---|
TWriter | The type of binary writer. |
Explicit Interface Implementations
| Improve this Doc View SourceIRaftLogEntry.Term
Declaration
long IRaftLogEntry.Term { get; }
Returns
Type | Description |
---|---|
Int64 |