Struct LogEntry<TCommand>
Represents Raft log entry containing custom command.
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft.Commands
Assembly: DotNext.Net.Cluster.dll
Syntax
public readonly struct LogEntry<TCommand> : IRaftLogEntry, ILogEntry, IDataTransferObject where TCommand : notnull, ISerializable<TCommand>
Type Parameters
Name | Description |
---|---|
TCommand | The type of the command encoded by the log entry. |
Constructors
| Edit this page View SourceLogEntry()
Represents Raft log entry containing custom command.
Declaration
public LogEntry()
See Also
Properties
| Edit this page View SourceCommand
Gets the command associated with this log entry.
Declaration
public required TCommand Command { get; init; }
Property Value
Type | Description |
---|---|
TCommand |
CommandId
Gets identifier of the underlying command associated with this log entry.
Declaration
public required int CommandId { get; init; }
Property Value
Type | Description |
---|---|
int |
Term
Gets Term value associated with this log entry.
Declaration
public required long Term { get; init; }
Property Value
Type | Description |
---|---|
long |
Timestamp
Gets UTC time of the log entry when it was created.
Declaration
public DateTimeOffset Timestamp { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset |