Class PersistentState.SnapshotBuilder
Represents snapshot builder.
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
protected abstract class SnapshotBuilder : Disposable, IRaftLogEntry, ILogEntry, IDataTransferObject
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. |
CopyToAsync(PipeWriter, CancellationToken)
Copies the reduced command into the specified pipe.
Declaration
public abstract ValueTask CopyToAsync(PipeWriter output, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| PipeWriter | output | The write-only representation of the pipe. |
| CancellationToken | token | The token that can be used to cancel the operation. |
Returns
| Type | Description |
|---|---|
| ValueTask | The task representing asynchronous state of this operation. |
CopyToAsync(Stream, CancellationToken)
Copies the reduced command into the specified stream.
Declaration
public abstract Task CopyToAsync(Stream output, CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | output | The write-only stream. |
| CancellationToken | token | The token that can be used to cancel the operation. |
Returns
| Type | Description |
|---|---|
| Task | The task representing asynchronous state of this operation. |
Explicit Interface Implementations
| Improve this Doc View SourceIDataTransferObject.IsReusable
Declaration
bool IDataTransferObject.IsReusable { get; }
Returns
| Type | Description |
|---|---|
| Boolean |
IDataTransferObject.Length
Declaration
long? IDataTransferObject.Length { get; }
Returns
| Type | Description |
|---|---|
| Nullable<Int64> |
IRaftLogEntry.Term
Declaration
long IRaftLogEntry.Term { get; }
Returns
| Type | Description |
|---|---|
| Int64 |
ILogEntry.IsSnapshot
Declaration
bool ILogEntry.IsSnapshot { get; }
Returns
| Type | Description |
|---|---|
| Boolean |
ILogEntry.Timestamp
Declaration
DateTimeOffset ILogEntry.Timestamp { get; }
Returns
| Type | Description |
|---|---|
| DateTimeOffset |