Class ConsensusOnlyState
Represents lightweight Raft node state that is suitable for distributed consensus only.
Inheritance
ConsensusOnlyState
Assembly: DotNext.Net.Cluster.dll
Syntax
public sealed class ConsensusOnlyState : Disposable, IDisposable, IPersistentState, Log.IAuditTrail<IRaftLogEntry>
Methods
|
Improve this Doc
View Source
Dispose(Boolean)
Releases all resources associated with this audit trail.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
Boolean |
disposing |
Indicates whether the Dispose(Boolean) has been called directly or from finalizer.
|
Overrides
|
Improve this Doc
View Source
GetLastIndex(Boolean)
Gets index of the committed or last log entry.
Declaration
public long GetLastIndex(bool committed)
Parameters
Type |
Name |
Description |
Boolean |
committed |
true to get the index of highest log entry known to be committed; false to get the index of the last log entry.
|
Returns
Type |
Description |
Int64 |
The index of the log entry.
|
Explicit Interface Implementations
|
Improve this Doc
View Source
IPersistentState.EnsureConsistencyAsync(TimeSpan, CancellationToken)
Declaration
Task IPersistentState.EnsureConsistencyAsync(TimeSpan timeout, CancellationToken token)
Parameters
Returns
|
Improve this Doc
View Source
IPersistentState.IncrementTermAsync()
Declaration
ValueTask<long> IPersistentState.IncrementTermAsync()
Returns
|
Improve this Doc
View Source
IPersistentState.IsVotedFor(IRaftClusterMember)
Declaration
bool IPersistentState.IsVotedFor(IRaftClusterMember member)
Parameters
Returns
|
Improve this Doc
View Source
IPersistentState.Term
Declaration
long IPersistentState.Term { get; }
Returns
|
Improve this Doc
View Source
IPersistentState.UpdateTermAsync(Int64)
Declaration
ValueTask IPersistentState.UpdateTermAsync(long value)
Parameters
Type |
Name |
Description |
Int64 |
value |
|
Returns
|
Improve this Doc
View Source
IPersistentState.UpdateVotedForAsync(IRaftClusterMember)
Declaration
ValueTask IPersistentState.UpdateVotedForAsync(IRaftClusterMember member)
Parameters
Returns
Implements
Extension Methods