Passivate
Defined in: src/cluster/sharding/Passivate.ts:19
An entity actor sends Passivate(stopMessage) to its parent (the shard
region) to request a graceful shutdown. The region then forwards
stopMessage to the entity and buffers any further traffic for the
entity until it has fully stopped; the next inbound message recreates
the entity and flushes the buffer.
Two call shapes are accepted:
// Explicit (recommended) — entity attaches its own ref so the region
// can find it regardless of how tell was invoked:
this.context.parent?.tell(new Passivate(Stop, this.self));
// Implicit — works when the enclosing tell also passed self as
// the sender:
this.context.parent?.tell(new Passivate(Stop), this.self);
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Passivate(
stopMessage,entity?):Passivate
Defined in: src/cluster/sharding/Passivate.ts:20
Parameters
Section titled “Parameters”stopMessage
Section titled “stopMessage”unknown
entity?
Section titled “entity?”ActorRef<unknown>
Returns
Section titled “Returns”Passivate
Properties
Section titled “Properties”entity?
Section titled “entity?”
readonlyoptionalentity?:ActorRef<unknown>
Defined in: src/cluster/sharding/Passivate.ts:22
stopMessage
Section titled “stopMessage”
readonlystopMessage:unknown
Defined in: src/cluster/sharding/Passivate.ts:21