Show / Hide Table of Contents

Class Command

Represents extension methods to work with commands.

Inheritance
object
Command
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DotNext.Net.Cluster.Consensus.Raft.Commands
Assembly: DotNext.Net.Cluster.dll
Syntax
public static class Command

Methods

| Edit this page View Source

AppendAsync<TCommand>(IPersistentState, TCommand, object?, CancellationToken)

Appends a strongly typed command to the log tail.

Declaration
public static ValueTask<long> AppendAsync<TCommand>(this IPersistentState state, TCommand command, object? context = null, CancellationToken token = default) where TCommand : ICommand<TCommand>
Parameters
Type Name Description
IPersistentState state

The log.

TCommand command

The command to append.

object context

The optional context to be passed to the state machine.

CancellationToken token

The token that can be used to cancel the operation.

Returns
Type Description
ValueTask<long>

The index of the added command within the log.

Type Parameters
Name Description
TCommand

The type of the command.

  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾