C# 클래스 Akka.Cluster.Tools.Singleton.ClusterSingletonProxy

The ClusterSingletonProxy works together with the ClusterSingletonManager to provide a distributed proxy to the singleton actor.

The proxy can be started on every node where the singleton needs to be reached and used as if it were the singleton itself. It will then act as a router to the currently running singleton instance. If the singleton is not currently available, e.g., during hand off or startup, the proxy will buffer the messages sent to the singleton and then deliver them when the singleton is finally available. The size of the buffer is configurable and it can be disabled by using a buffer size of 0. When the buffer is full old messages will be dropped when new messages are sent via the proxy.

The proxy works by keeping track of the oldest cluster member. When a new oldest member is identified, e.g. because the older one left the cluster, or at startup, the proxy will try to identify the singleton on the oldest member by periodically sending an Identify message until the singleton responds with its ActorIdentity.

Note that this is a best effort implementation: messages can always be lost due to the distributed nature of the actors involved.
상속: Akka.Actor.UntypedActor
파일 보기 프로젝트 열기: rogeralsing/akka.net

Private Properties

프로퍼티 타입 설명
Add void
Buffer void
CancelTimer void
CreateIdentifyId string
HandleInitial void
IdentifySingleton void
MatchingRole bool
Remove void
SendBuffered void
TrackChanges void

공개 메소드들

메소드 설명
ClusterSingletonProxy ( string singletonManagerPath, Akka.Cluster.Tools.Singleton.ClusterSingletonProxySettings settings ) : System
DefaultConfig ( ) : Config

Returns default HOCON configuration for the cluster singleton.

Props ( string singletonManagerPath, Akka.Cluster.Tools.Singleton.ClusterSingletonProxySettings settings ) : Props

Faactory method for ClusterSingletonProxy Actor.Props.

보호된 메소드들

메소드 설명
OnReceive ( object message ) : void
PostStop ( ) : void
PreStart ( ) : void

비공개 메소드들

메소드 설명
Add ( Member member ) : void
Buffer ( object message ) : void
CancelTimer ( ) : void
CreateIdentifyId ( int i ) : string
HandleInitial ( ClusterEvent state ) : void
IdentifySingleton ( ) : void
MatchingRole ( Member member ) : bool
Remove ( Member member ) : void
SendBuffered ( ) : void
TrackChanges ( System.Action block ) : void

메소드 상세

ClusterSingletonProxy() 공개 메소드

public ClusterSingletonProxy ( string singletonManagerPath, Akka.Cluster.Tools.Singleton.ClusterSingletonProxySettings settings ) : System
singletonManagerPath string
settings Akka.Cluster.Tools.Singleton.ClusterSingletonProxySettings
리턴 System

DefaultConfig() 공개 정적인 메소드

Returns default HOCON configuration for the cluster singleton.
public static DefaultConfig ( ) : Config
리턴 Akka.Configuration.Config

OnReceive() 보호된 메소드

protected OnReceive ( object message ) : void
message object
리턴 void

PostStop() 보호된 메소드

protected PostStop ( ) : void
리턴 void

PreStart() 보호된 메소드

protected PreStart ( ) : void
리턴 void

Props() 공개 정적인 메소드

Faactory method for ClusterSingletonProxy Actor.Props.
public static Props ( string singletonManagerPath, Akka.Cluster.Tools.Singleton.ClusterSingletonProxySettings settings ) : Props
singletonManagerPath string /// The logical path of the singleton manager, e.g. `/user/singletonManager`, /// which ends with the name you defined in `actorOf` when creating the . ///
settings Akka.Cluster.Tools.Singleton.ClusterSingletonProxySettings Cluster singleton proxy settings.
리턴 Props