Show / Hide Table of Contents

Interface IPersistentState

Represents persistent state of local cluster member required by Raft consensus protocol.

Inherited Members
IAuditTrail<IRaftLogEntry>.ReadAsync<TReader, TResult>(TReader, Int64, Int64, CancellationToken)
IAuditTrail<IRaftLogEntry>.ReadAsync<TReader, TResult>(TReader, Int64, CancellationToken)
IAuditTrail<IRaftLogEntry>.AppendAsync<TEntryImpl>(ILogEntryProducer<TEntryImpl>, Int64, Boolean, CancellationToken)
IAuditTrail<IRaftLogEntry>.AppendAsync<TEntryImpl>(ILogEntryProducer<TEntryImpl>, CancellationToken)
IAuditTrail<IRaftLogEntry>.AppendAsync<TEntryImpl>(TEntryImpl, Int64)
IAuditTrail<IRaftLogEntry>.DropAsync(Int64, CancellationToken)
IAuditTrail<IRaftLogEntry>.First
IAuditTrail.GetLastIndex(Boolean)
IAuditTrail.WaitForCommitAsync(Int64, TimeSpan, CancellationToken)
IAuditTrail.CommitAsync(Int64, CancellationToken)
IAuditTrail.CommitAsync(CancellationToken)
IAuditTrail.EnsureConsistencyAsync(CancellationToken)
Namespace: DotNext.Net.Cluster.Consensus.Raft
Assembly: DotNext.Net.Cluster.dll
Syntax
public interface IPersistentState : IAuditTrail<IRaftLogEntry>, IAuditTrail

Properties

| Improve this Doc View Source

Term

Reads Term value associated with the local member from the persistent storage.

Declaration
long Term { get; }
Property Value
Type Description
Int64

The term restored from persistent storage.

Methods

| Improve this Doc View Source

IncrementTermAsync()

Increments Term value.

Declaration
ValueTask<long> IncrementTermAsync()
Returns
Type Description
ValueTask<Int64>

The updated Term value.

| Improve this Doc View Source

IsVotedFor(IRaftClusterMember)

Determines whether the local member granted its vote for the specified remote member.

Declaration
bool IsVotedFor(IRaftClusterMember member)
Parameters
Type Name Description
IRaftClusterMember member

The cluster member to check.

Returns
Type Description
Boolean

true if the local member granted its vote for the specified remote member; otherwise, false.

| Improve this Doc View Source

UpdateTermAsync(Int64)

Persists the last actual Term.

Declaration
ValueTask UpdateTermAsync(long term)
Parameters
Type Name Description
Int64 term

The term value to be persisted.

Returns
Type Description
ValueTask

The task representing asynchronous execution of the operation.

| Improve this Doc View Source

UpdateVotedForAsync(IRaftClusterMember)

Persists the item that was voted for on in the last vote.

Declaration
ValueTask UpdateVotedForAsync(IRaftClusterMember member)
Parameters
Type Name Description
IRaftClusterMember member

The member which identifier should be stored inside of persistence storage. May be null.

Returns
Type Description
ValueTask

The task representing asynchronous execution of the operation.

Extension Methods

AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, CancellationToken)
ExpressionBuilder.Const<T>(T)
ObjectExtensions.GetUserData<T>(T)
ObjectExtensions.IsOneOf<T>(T, IEnumerable<T>)
ObjectExtensions.IsOneOf<T>(T, T[])
ObjectExtensions.Decompose<T, R1, R2>(T, Func<T, R1>, Func<T, R2>, out R1, out R2)
ObjectExtensions.Decompose<T, R1, R2>(T, ValueFunc<T, R1>, ValueFunc<T, R2>, out R1, out R2)
ObjectExtensions.Decompose<T, R1, R2>(T, Func<T, R1>, Func<T, R2>)
ObjectExtensions.Decompose<T, R1, R2>(T, ValueFunc<T, R1>, ValueFunc<T, R2>)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX