Struct JsonLogEntry<T>
Represents JSON-serializable log entry.
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
public readonly struct JsonLogEntry<T> : IInputLogEntry, IRaftLogEntry, ILogEntry, IDataTransferObject where T : notnull, IJsonSerializable<T>
Type Parameters
Name | Description |
---|---|
T | JSON-serializable type. |
Constructors
| Edit this page View SourceJsonLogEntry()
Represents JSON-serializable log entry.
Declaration
public JsonLogEntry()
Properties
| Edit this page View SourceContent
Gets the payload of this log entry.
Declaration
public required T? Content { get; init; }
Property Value
Type | Description |
---|---|
T |
Context
Gets or sets runtime context associated with the log entry.
Declaration
public object? Context { get; init; }
Property Value
Type | Description |
---|---|
object |
Remarks
The value passes through AppendAsync<TEntryImpl>(TEntryImpl, CancellationToken) to ApplyAsync(LogEntry) or ApplyAsync(LogEntry). It can be retrieved by using Context property.
Term
Gets Term value associated with this log entry.
Declaration
public required long Term { get; init; }
Property Value
Type | Description |
---|---|
long |
Timestamp
Gets the timestamp of this log entry.
Declaration
public DateTimeOffset Timestamp { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset |