Show / Hide Table of Contents

Interface ISubscriber

Represents cluster member that supports messaging.

Inherited Members
IClusterMember.Endpoint
IClusterMember.IsLeader
IClusterMember.IsRemote
IClusterMember.MemberStatusChanged
IClusterMember.Status
IClusterMember.GetMetadata(Boolean, CancellationToken)
IClusterMember.ResignAsync(CancellationToken)
Namespace: DotNext.Net.Cluster.Messaging
Assembly: DotNext.Net.Cluster.dll
Syntax
public interface ISubscriber : IClusterMember, IEquatable<IClusterMember>

Methods

| Improve this Doc View Source

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

Sends a message to the cluster member.

Declaration
Task<TResponse> SendMessageAsync<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

The message content may be available inside of responseReader only. Do not try to return IMessage itself from the delegate.

| Improve this Doc View Source

SendSignalAsync(IMessage, Boolean, CancellationToken)

Sends one-way message to the cluster member.

Declaration
Task SendSignalAsync(IMessage message, bool requiresConfirmation = true, CancellationToken token = null)
Parameters
Type Name Description
IMessage message

The message to be sent.

Boolean requiresConfirmation

true to wait for confirmation of delivery from receiver; otherwise, false.

CancellationToken token

The token that can be used to cancel asynchronous operation.

Returns
Type Description
Task

The task representing execution of this method.

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.SendTextMessageAsync<TResponse>(ISubscriber, MessageReader<TResponse>, String, String, String, CancellationToken)
Messenger.SendTextSignalAsync(ISubscriber, String, String, Boolean, String, 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