Interface IReplicationCluster<TEntry>
Represents replication cluster.
Inherited Members
Namespace: DotNext.Net.Cluster.Replication
Assembly: DotNext.Net.Cluster.dll
Syntax
public interface IReplicationCluster<TEntry> : IReplicationCluster, ICluster, IPeerMesh<IClusterMember>, IPeerMesh where TEntry : class, ILogEntry
Type Parameters
Name | Description |
---|---|
TEntry | The type of the log entry in the transaction log. |
Properties
| Edit this page View SourceAuditTrail
Gets transaction log used for replication.
Declaration
IAuditTrail<TEntry> AuditTrail { get; }
Property Value
Type | Description |
---|---|
IAuditTrail<TEntry> |
Methods
| Edit this page View SourceReplicateAsync<TEntryImpl>(TEntryImpl, CancellationToken)
Appends a new log entry and ensures that it is replicated and committed.
Declaration
ValueTask<bool> ReplicateAsync<TEntryImpl>(TEntryImpl entry, CancellationToken token = default) where TEntryImpl : notnull, TEntry
Parameters
Type | Name | Description |
---|---|---|
TEntryImpl | entry | The log entry to be added. |
CancellationToken | token | The token that can be used to cancel the operation. |
Returns
Type | Description |
---|---|
ValueTask<bool> | true if the appended log entry has been committed by the majority of nodes; false if retry is required. |
Type Parameters
Name | Description |
---|---|
TEntryImpl | The type of the log entry. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The current node is not a leader. |
OperationCanceledException | The operation has been canceled. |