API Diff between 4.4.0 and 2.3.0
340 Additions
73 Removals
DotNext.Net
DotNext.Net.Cluster
DotNext.Net.Cluster.Consensus.Raft
-
public struct BinaryLogEntry<T> : IBinaryLogEntry, IRaftLogEntry, ILogEntry, IDataTransferObject where T : struct, IBinaryFormattable<T>
-
public struct BufferedRaftLogEntry : IRaftLogEntry, ILogEntry, IDataTransferObject, IDisposable
-
public struct BufferedRaftLogEntryList : IDisposable, IReadOnlyList<BufferedRaftLogEntry>, IEnumerable<BufferedRaftLogEntry>, IEnumerable, IReadOnlyCollection<BufferedRaftLogEntry>
-
public sealed class ConsensusOnlyState : Disposable, IPersistentState, IAuditTrail<IRaftLogEntry>, IAuditTrail
-
public abstract class DiskBasedStateMachine : PersistentState
-
public struct ElectionTimeout
-
public static class ElectionTimeoutExtensions
-
public struct EmptyEntry : IRaftLogEntry, ILogEntry, IDataTransferObject
-
public struct EmptyLogEntry : IRaftLogEntry, ILogEntry, IDataTransferObject
-
public interface IClusterMemberConfiguration
-
public interface ILeaderLease
-
public interface IPersistentState : IAuditTrail<IRaftLogEntry>, IAuditTrail
-
public interface IRaftCluster : IReplicationCluster<IRaftLogEntry>, IReplicationCluster, ICluster, IPeerMesh<IClusterMember>, IPeerMesh, IPeerMesh<IRaftClusterMember>
-
public interface IRaftClusterMember : IClusterMember, IPeer
- ref long ConfigurationFingerprint { get; }
- Task<Result<bool>> AppendEntriesAsync<TEntry, TList>(long term, TList entries, long prevLogIndex, long prevLogTerm, long commitIndex, CancellationToken token) where TEntry : IRaftLogEntry where TList : IReadOnlyList<TEntry>
- void CancelPendingRequests()
- Task<Result<bool>> AppendEntriesAsync<TEntry, TList>(long term, TList entries, long prevLogIndex, long prevLogTerm, long commitIndex, IClusterConfiguration config, bool applyConfig, CancellationToken token) where TEntry : IRaftLogEntry where TList : IReadOnlyList<TEntry>
- ValueTask CancelPendingRequestsAsync()
- Task<Result<PreVoteResult>> PreVoteAsync(long term, long lastLogIndex, long lastLogTerm, CancellationToken token)
- Task<long?> SynchronizeAsync(long commitIndex, CancellationToken token)
-
public interface IRaftLogEntry : ILogEntry, IDataTransferObject
-
public struct JsonLogEntry<T> : IRaftLogEntry, ILogEntry, IDataTransferObject
-
public abstract class MemoryBasedStateMachine : PersistentState
-
public abstract class PersistentState : Disposable, IPersistentState, IAuditTrail<IRaftLogEntry>, IAuditTrail
- protected struct LogEntry : IRaftLogEntry, ILogEntry, IDataTransferObject, IAsyncBinaryReader
- public sealed class InternalStateBrokenException : IntegrityException
- public sealed class MissingPartitionException : IntegrityException
- protected abstract class SnapshotBuilder : Disposable, IRaftLogEntry, ILogEntry, IDataTransferObject
- public struct WriteLockToken : IDisposable
- protected Memory<byte> Buffer { get; }
- public enum WriteMode
- public long LastCommittedEntryIndex { get; }
- public long LastUncommittedEntryIndex { get; }
- protected DirectoryInfo Location { get; }
- public PersistentState(DirectoryInfo path, int recordsPerPartition, Options configuration = null)
- public PersistentState(string path, int recordsPerPartition, Options configuration = null)
- public Task<WriteLockToken> AcquireWriteLockAsync(TimeSpan timeout, CancellationToken token = default)
- public Task<WriteLockToken> AcquireWriteLockAsync(CancellationToken token)
- public ValueTask AppendAsync<TEntry>(ref WriteLockToken writeLock, TEntry entry, long startIndex) where TEntry : IRaftLogEntry
- public ValueTask AppendAsync<TEntry>(TEntry entry, long startIndex) where TEntry : IRaftLogEntry
- public ValueTask<long> AppendAsync<TEntry>(ref WriteLockToken writeLock, TEntry entry, CancellationToken token) where TEntry : IRaftLogEntry
- public ValueTask AppendAsync<TEntry>(TEntry entry, long startIndex, CancellationToken token = default) where TEntry : IRaftLogEntry
- public ValueTask<long> AppendAsync<TEntry>(TEntry entry, bool addToCache, CancellationToken token = default) where TEntry : IRaftLogEntry
- protected virtual ValueTask ApplyAsync(LogEntry entry)
- protected virtual Task ClearAsync(CancellationToken token = default)
- protected virtual SnapshotBuilder CreateSnapshotBuilder()
- public virtual ValueTask DisposeAsync()
- public ValueTask<long> DropAsync(long startIndex, CancellationToken token)
- public Task EnsureConsistencyAsync(TimeSpan timeout, CancellationToken token)
- protected virtual ValueTask FlushAsync()
- public long GetLastIndex(bool committed)
- public JsonLogEntry<T> CreateJsonLogEntry<T>(T content, string typeId = null, JsonSerializerOptions options = null)
- public JsonLogEntry<T> CreateJsonLogEntry<T>(T content, string typeId, JsonTypeInfo<T> typeInfo)
- public void DbgChangeLastIndex(long index)
- public ValueTask<long> DropAsync(long startIndex, bool reuseSpace = false, CancellationToken token = default)
- public ValueTask EnsureConsistencyAsync(CancellationToken token)
- public bool IsValidToken(ref WriteLockToken token)
- public ValueTask<TResult> ReadAsync<TReader, TResult>(TReader reader, long startIndex, long endIndex, CancellationToken token) where TReader : ILogEntryConsumer<IRaftLogEntry, TResult>
- public ValueTask<TResult> ReadAsync<TReader, TResult>(TReader reader, long startIndex, CancellationToken token) where TReader : ILogEntryConsumer<IRaftLogEntry, TResult>
- public Task ReplayAsync(CancellationToken token = default)
- public Task<bool> WaitForCommitAsync(TimeSpan timeout, CancellationToken token)
- public Task<bool> WaitForCommitAsync(long index, TimeSpan timeout, CancellationToken token)
- public ValueTask<TResult> ReadAsync<TResult>(LogEntryConsumer<IRaftLogEntry, TResult> reader, long startIndex, long endIndex, CancellationToken token = default)
- public ValueTask<TResult> ReadAsync<TResult>(LogEntryConsumer<IRaftLogEntry, TResult> reader, long startIndex, CancellationToken token = default)
- public ValueTask WaitForCommitAsync(CancellationToken token = default)
- public ValueTask WaitForCommitAsync(long index, CancellationToken token = default)
-
public enum PreVoteResult
-
public class RaftCluster : RaftCluster<RaftClusterMember>, ILocalMember
-
public abstract class RaftCluster<TMember> : Disposable, IRaftCluster, IReplicationCluster<IRaftLogEntry>, IReplicationCluster, ICluster, IPeerMesh<IClusterMember>, IPeerMesh, IPeerMesh<IRaftClusterMember>, IRaftStateMachine, IAsyncDisposable where TMember : IRaftClusterMember, IDisposable
- protected struct MemberCollectionBuilder<TMember> where TMember : IRaftClusterMember, IDisposable
- protected sealed delegate MemberCollectionMutator<TMember> : MulticastDelegate where TMember : IRaftClusterMember, IDisposable
- protected struct MemberHolder<TMember> where TMember : IRaftClusterMember, IDisposable
- protected abstract IClusterConfigurationStorage ConfigurationStorage { get; }
- public TimeSpan ElectionTimeout { get; }
- public CancellationToken LeadershipToken { get; }
- public ILeaderLease Lease { get; }
- protected CancellationToken LifecycleToken { get; }
- public ClusterMemberId& modreq(System.Runtime.InteropServices.InAttribute) LocalMemberId { get; }
- public Task Readiness { get; }
- protected CancellationToken Token { get; }
- public event ClusterLeaderChangedEventHandler LeaderChanged
- protected RaftCluster(IClusterMemberConfiguration config, out MemberCollectionBuilder members)
- protected Task ChangeMembersAsync(MemberCollectionMutator<TMember> mutator, CancellationToken token)
- protected Task ChangeMembersAsync(MemberCollectionMutator<TMember> mutator)
- protected TMember FindMember(Predicate<TMember> criteria)
- protected TMember FindMember<TArg>(Func<TMember, TArg, bool> criteria, TArg arg)
- public Task<bool> ForceReplicationAsync(TimeSpan timeout, CancellationToken token = default)
- protected Task<Result<bool>> ReceiveEntries<TEntry>(TMember sender, long senderTerm, ILogEntryProducer<TEntry> entries, long prevLogIndex, long prevLogTerm, long commitIndex) where TEntry : IRaftLogEntry
- protected Task<Result<bool>> ReceiveEntriesAsync<TEntry>(TMember sender, long senderTerm, ILogEntryProducer<TEntry> entries, long prevLogIndex, long prevLogTerm, long commitIndex, CancellationToken token) where TEntry : IRaftLogEntry
- protected Task<bool> ReceiveResign()
- protected Task<bool> ReceiveResignAsync(CancellationToken token)
- protected Task<Result<bool>> ReceiveSnapshot(TMember sender, long senderTerm, IRaftLogEntry snapshot, long snapshotIndex)
- protected Task<Result<bool>> ReceiveSnapshotAsync<TSnapshot>(TMember sender, long senderTerm, TSnapshot snapshot, long snapshotIndex, CancellationToken token) where TSnapshot : IRaftLogEntry
- protected Task<Result<bool>> ReceiveVote(TMember sender, long senderTerm, long lastLogIndex, long lastLogTerm)
- protected Task<Result<bool>> ReceiveVoteAsync(TMember sender, long senderTerm, long lastLogIndex, long lastLogTerm, CancellationToken token)
- public event Action<RaftCluster<TMember>, TMember> LeaderChanged
- public event Action<RaftCluster<TMember>, RaftClusterMemberEventArgs<TMember>> MemberAdded
- public event Action<RaftCluster<TMember>, RaftClusterMemberEventArgs<TMember>> MemberRemoved
- public event Action<RaftCluster<TMember>, TMember> ReplicationCompleted
- protected RaftCluster(IClusterMemberConfiguration config)
- protected ValueTask<bool> AddMemberAsync(TMember member, CancellationToken token)
- protected Task<bool> AddMemberAsync<TAddress>(TMember member, int rounds, IClusterConfigurationStorage<TAddress> configurationStorage, Func<TMember, TAddress> addressProvider, CancellationToken token = default)
- protected Task<Result<bool>> AppendEntriesAsync<TEntry>(ClusterMemberId sender, long senderTerm, ILogEntryProducer<TEntry> entries, long prevLogIndex, long prevLogTerm, long commitIndex, IClusterConfiguration config, bool applyConfig, CancellationToken token) where TEntry : IRaftLogEntry
- public ValueTask ApplyReadBarrierAsync(CancellationToken token = default)
- public ValueTask DisposeAsync()
- public Task ForceReplicationAsync(CancellationToken token = default)
- protected Task<Result<bool>> InstallSnapshotAsync<TSnapshot>(ClusterMemberId sender, long senderTerm, TSnapshot snapshot, long snapshotIndex, CancellationToken token) where TSnapshot : IRaftLogEntry
- protected Task<Result<PreVoteResult>> PreVoteAsync(long nextTerm, long lastLogIndex, long lastLogTerm, CancellationToken token)
- protected ValueTask<TMember> RemoveMemberAsync(ClusterMemberId id, CancellationToken token)
- public Task<bool> RemoveMemberAsync<TAddress>(ClusterMemberId id, IClusterConfigurationStorage<TAddress> configurationStorage, CancellationToken token = default)
- public Task<bool> ReplicateAsync<TEntry>(TEntry entry, CancellationToken token) where TEntry : IRaftLogEntry
- protected Task<bool> ResignAsync(CancellationToken token)
- protected void StartFollowing()
- protected Task<long?> SynchronizeAsync(long commitIndex, CancellationToken token)
- protected TMember TryGetMember(ClusterMemberId id)
- public ValueTask TurnIntoRegularNodeAsync(CancellationToken token)
- protected Task<Result<bool>> VoteAsync(ClusterMemberId sender, long senderTerm, long lastLogIndex, long lastLogTerm, CancellationToken token)
-
public abstract class RaftClusterMember : Disposable, IRaftClusterMember, IClusterMember, IPeer
-
public class RaftClusterMemberEventArgs<TMember> : ClusterMemberEventArgs where TMember : IRaftClusterMember
-
public class RaftLogEntriesBufferingOptions : RaftLogEntryBufferingOptions
-
public struct RaftLogEntry : IBinaryLogEntry, IRaftLogEntry, ILogEntry, IDataTransferObject
-
public class RaftLogEntryBufferingOptions
-
public struct Result<T>
- public readonly long Term
- public readonly T Value
- public long Term { get; }
- public T Value { get; set; }
DotNext.Net.Cluster.Consensus.Raft.Commands
DotNext.Net.Cluster.Consensus.Raft.Membership
DotNext.Net.Cluster.Discovery
DotNext.Net.Cluster.Discovery.HyParView
-
public class HyParViewProtocolException : DiscoveryProtocolException
-
public interface IPeerConfiguration
-
public abstract class PeerController : Disposable, IPeerMesh, IAsyncDisposable
- protected CancellationToken LifecycleToken { get; }
- protected virtual ILogger Logger { get; }
- public IReadOnlySet<EndPoint> Neighbors { get; }
- public event Action<PeerController, PeerEventArgs> PeerDiscovered
- public event Action<PeerController, PeerEventArgs> PeerGone
- protected PeerController(IPeerConfiguration configuration, IEqualityComparer<EndPoint> peerComparer = null)
- protected virtual void Destroy(EndPoint peer)
- protected virtual ValueTask DestroyAsync(EndPoint peer)
- protected abstract Task DisconnectAsync(EndPoint peer, bool isAlive, CancellationToken token)
- protected virtual ValueTask DisconnectAsync(EndPoint peer)
- public ValueTask DisposeAsync()
- public ValueTask EnqueueBroadcastAsync(Func<PeerController, IRumorSender> senderFactory, CancellationToken token = default)
- protected ValueTask EnqueueDisconnectAsync(EndPoint sender, bool isAlive, CancellationToken token = default)
- protected ValueTask EnqueueForwardJoinAsync(EndPoint sender, EndPoint joinedPeer, int timeToLive, CancellationToken token = default)
- protected ValueTask EnqueueJoinAsync(EndPoint joinedPeer, CancellationToken token = default)
- protected ValueTask EnqueueNeighborAsync(EndPoint sender, bool highPriority, CancellationToken token = default)
- public ValueTask EnqueueShuffleAsync(CancellationToken token = default)
- protected ValueTask EnqueueShuffleAsync(EndPoint sender, EndPoint origin, IReadOnlyCollection<EndPoint> peers, int timeToLive, CancellationToken token = default)
- protected ValueTask EnqueueShuffleReplyAsync(IReadOnlyCollection<EndPoint> peers, CancellationToken token = default)
- protected abstract Task ForwardJoinAsync(EndPoint receiver, EndPoint joinedPeer, int timeToLive, CancellationToken token)
- protected abstract bool IsLocalNode(EndPoint peer)
- protected abstract Task JoinAsync(EndPoint contactNode, CancellationToken token)
- protected abstract Task NeighborAsync(EndPoint neighbor, bool highPriority, CancellationToken token)
- protected virtual void OnError(EndPoint peer, Exception e)
- public ValueTask ReportFailedPeerAsync(EndPoint failedPeer, CancellationToken token)
- protected abstract Task ShuffleAsync(EndPoint receiver, EndPoint origin, IReadOnlyCollection<EndPoint> peers, int timeToLive, CancellationToken token = default)
- protected abstract Task ShuffleReplyAsync(EndPoint receiver, IReadOnlyCollection<EndPoint> peers, CancellationToken token = default)
- public Task StartAsync(EndPoint contactNode, CancellationToken token)
- public virtual Task StopAsync(CancellationToken token)
DotNext.Net.Cluster.Messaging
DotNext.Net.Cluster.Messaging.Gossip
DotNext.Net.Cluster.Replication
DotNext.Net.ConsistentHash
-
public static class JumpHash
- public static int GetBucket(ulong key, int buckets)
- public static int GetBucket(long key, int buckets)
DotNext.Net.Security