Skip to content

ClusterSingletonProxy

Defined in: src/cluster/singleton/ClusterSingletonProxy.ts:20

Location-transparent handle to a cluster-wide singleton. Every call to tell looks up the current leader and forwards to that node’s ClusterSingletonManager (via direct tell if local, via envelope if remote). Messages sent before the cluster has elected a leader are buffered and drained when the first LeaderChanged event fires.

The proxy extends ActorRef so it can be passed anywhere an ActorRef is expected (e.g. as a sender for ask patterns). It is not backed by a real actor — it is a thin forwarder.

T

new ClusterSingletonProxy<T>(cluster, typeName, localManagerRef): ClusterSingletonProxy<T>

Defined in: src/cluster/singleton/ClusterSingletonProxy.ts:26

Cluster

string

ActorRef

ClusterSingletonProxy<T>

ActorRef.constructor

readonly path: ActorPath

Defined in: src/cluster/singleton/ClusterSingletonProxy.ts:21

ActorRef.path

equals(other): boolean

Defined in: src/ActorRef.ts:26

ActorRef

boolean

ActorRef.equals


hasPending(): boolean

Defined in: src/cluster/singleton/ClusterSingletonProxy.ts:61

True if at least one message is currently buffered.

boolean


kill(): void

Defined in: src/ActorRef.ts:22

Kill this actor — raises ActorKilledError through the normal supervision path.

void

ActorRef.kill


send(message): void

Defined in: src/ActorRef.ts:16

Alias for tell — useful if you want to pipe something.

T

void

ActorRef.send


stop(): void

Defined in: src/cluster/singleton/ClusterSingletonProxy.ts:54

Stop forwarding; unsubscribes from cluster events.

void

ActorRef.stop


tell(message, _sender?): void

Defined in: src/cluster/singleton/ClusterSingletonProxy.ts:43

Send a message to this actor. sender is surfaced as context.sender in the recipient.

T

ActorRef<unknown> | null

void

ActorRef.tell


toString(): string

Defined in: src/ActorRef.ts:24

string

ActorRef.toString