Show / Hide Table of Contents

Interface IMessageBus

Specifies a cloud of nodes that can communicate with each other through the network.

Inherited Members
ICluster.LeaderChanged
ICluster.ResignAsync(CancellationToken)
Namespace: DotNext.Net.Cluster.Messaging
Assembly: DotNext.Net.Cluster.dll
Syntax
public interface IMessageBus : ICluster

Properties

| Improve this Doc View Source

Leader

Gets the leader node.

Declaration
ISubscriber Leader { get; }
Property Value
Type Description
ISubscriber
| Improve this Doc View Source

Members

Represents a collection of nodes in the network.

Declaration
IReadOnlyCollection<ISubscriber> Members { get; }
Property Value
Type Description
IReadOnlyCollection<ISubscriber>

Methods

| Improve this Doc View Source

SendMessageToLeaderAsync<TResponse>(IMessage, MessageReader<TResponse>, CancellationToken)

Sends a message to the cluster leader.

Declaration
Task<TResponse> SendMessageToLeaderAsync<TResponse>(IMessage message, MessageReader<TResponse> responseReader, CancellationToken token = null)
Parameters
Type Name Description
IMessage message

The message to be sent.

MessageReader<TResponse> responseReader

The response reader.

CancellationToken token

The token that can be used to cancel asynchronous operation.

Returns
Type Description
Task<TResponse>

The message representing response; or null if request message in one-way.

Type Parameters
Name Description
TResponse

The type of the parsed response message.

Remarks

message should be reusable because or can be called multiple times.

| Improve this Doc View Source

SendSignalToLeaderAsync(IMessage, CancellationToken)

Sends one-way message to the cluster leader.

Declaration
Task SendSignalToLeaderAsync(IMessage message, CancellationToken token = null)
Parameters
Type Name Description
IMessage message

The message to be sent.

CancellationToken token

The token that can be used to cancel asynchronous operation.

Returns
Type Description
Task

The task representing execution of this method.

Remarks

message should be reusable because or can be called multiple times.

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)
Messenger.SendBroadcastSignalAsync(IMessageBus, IMessage, Boolean)
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