Ir al contenido
Español

ClusterExtension

Esta página aún no está disponible en tu idioma.

Defined in: src/cluster/ClusterExtension.ts:21

Holds the Cluster this ActorSystem joined, so that anything holding the system can reach it — system.cluster, context.cluster, this.cluster — instead of having it threaded in by hand.

Cluster.join is the only writer. That keeps the invariant simple: the slot is filled exactly when a cluster exists, and nothing else has to remember to register.

It stays Option rather than being created on demand because a cluster is not free — it binds a transport and starts gossip, heartbeat and failure-detection timers. A local-only system must never grow one just because someone asked.

new ClusterExtension(): ClusterExtension

ClusterExtension

get(): Option<Cluster>

Defined in: src/cluster/ClusterExtension.ts:25

The joined cluster, or None on a system that never joined one.

Option<Cluster>