Struct BufferedLogEntry
Represents buffered log entry.
Inherited Members
Namespace: DotNext .Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
public readonly struct BufferedLogEntry : IRaftLogEntry, ILogEntry, IDataTransferObject, IDisposable
Remarks
This type is intended for developing transport-layer buffering and low level I/O optimizations when writing custom Write-Ahead Log. It's not recommended to use the type in the application code.
Properties
| Edit this page View SourceIsSnapshot
Gets a value indicating whether the current log entry is a snapshot.
Declaration
public bool IsSnapshot { get; }
Property Value
Type | Description |
---|---|
bool |
Length
Gets length of this log entry, in bytes.
Declaration
public long Length { get; }
Property Value
Type | Description |
---|---|
long |
Term
Gets Term value associated with the log entry.
Declaration
public long Term { get; }
Property Value
Type | Description |
---|---|
long |
Timestamp
Gets date/time of when log entry was created.
Declaration
public DateTimeOffset Timestamp { get; }
Property Value
Type | Description |
---|---|
Date |
Methods
| Edit this page View SourceCopyAsync<TEntry>(TEntry, LogEntryBufferingOptions, CancellationToken)
Constructs a copy of the specified log entry.
Declaration
public static ValueTask<BufferedLogEntry> CopyAsync<TEntry>(TEntry entry, LogEntryBufferingOptions options, CancellationToken token) where TEntry : notnull, IRaftLogEntry
Parameters
Type | Name | Description |
---|---|---|
TEntry | entry | The log entry to be copied. |
Log |
options | Buffering options. |
Cancellation |
token | The token that can be used to cancel the operation. |
Returns
Type | Description |
---|---|
Value |
Buffered copy of |
Type Parameters
Name | Description |
---|---|
TEntry | The type of the log entry to be copied. |
Exceptions
Type | Condition |
---|---|
Operation |
The operation has been canceled. |
Dispose()
Releases all resources associated with the buffer.
Declaration
public void Dispose()