C# 클래스 Akka.Cluster.Tools.Client.ClusterClient

This actor is intended to be used on an external node that is not member of the cluster. It acts like a gateway for sending messages to actors somewhere in the cluster. From the initial contact points it will establish a connection to a ClusterReceptionist somewhere in the cluster. It will monitor the connection to the receptionist and establish a new connection if the link goes down. When looking for a new receptionist it uses fresh contact points retrieved from previous establishment, or periodically refreshed contacts, i.e. not necessarily the initial contact points.

You can send messages via the `ClusterClient` to any actor in the cluster that is registered in the ClusterReceptionist. Messages are wrapped in ClusterClient.Send, ClusterClient.SendToAll or ClusterClient.Publish.

1. ClusterClient.Send - The message will be delivered to one recipient with a matching path, if any such exists. If several entries match the path the message will be delivered to one random destination. The sender of the message can specify that local affinity is preferred, i.e. the message is sent to an actor in the same local actor system as the used receptionist actor, if any such exists, otherwise random to any other matching entry.

2. ClusterClient.SendToAll - The message will be delivered to all recipients with a matching path.

3. ClusterClient.Publish - The message will be delivered to all recipients Actors that have been registered as subscribers to to the named topic.

Use the factory method ClusterClient.Props to create the Akka.Actor.Props for the actor.

상속: Akka.Actor.ActorBase
파일 보기 프로젝트 열기: rogeralsing/akka.net

공개 프로퍼티들

프로퍼티 타입 설명
Settings ClusterClientSettings

공개 메소드들

메소드 설명
ClusterClient ( ClusterClientSettings settings ) : System
Props ( ClusterClientSettings settings ) : Actor.Props

Factory method for ClusterClient Actor.Props.

보호된 메소드들

메소드 설명
PostStop ( ) : void
Receive ( object message ) : bool

비공개 메소드들

메소드 설명
Active ( IActorRef receptionist ) : Receive
Buffer ( object message ) : void
Establishing ( object message ) : bool
ScheduleRefreshContactsTick ( System.TimeSpan interval ) : void
SendBuffered ( IActorRef receptionist ) : void
SendGetContacts ( ) : void

메소드 상세

ClusterClient() 공개 메소드

public ClusterClient ( ClusterClientSettings settings ) : System
settings ClusterClientSettings
리턴 System

PostStop() 보호된 메소드

protected PostStop ( ) : void
리턴 void

Props() 공개 정적인 메소드

Factory method for ClusterClient Actor.Props.
public static Props ( ClusterClientSettings settings ) : Actor.Props
settings ClusterClientSettings
리턴 Actor.Props

Receive() 보호된 메소드

protected Receive ( object message ) : bool
message object
리턴 bool

프로퍼티 상세

Settings 공개적으로 프로퍼티

public ClusterClientSettings,Akka.Cluster.Tools.Client Settings
리턴 ClusterClientSettings