跳转到内容
简体中文

ActorOptionsBuilder

此内容尚不支持你的语言。

Defined in: src/ActorOptions.ts:121

Fluent builder for ActorOptionsType.

Mutates in place and returns this, per the shared OptionsBuilder contract: two chains off one instance are not two configurations. Build a second instance instead. The settings are snapshotted at spawn time, so a builder mutated afterwards never reconfigures a running actor.

TMessage = unknown

new ActorOptionsBuilder<TMessage>(): ActorOptionsBuilder<TMessage>

ActorOptionsBuilder<TMessage>

OptionsBuilder.constructor

build(): Partial<T>

Defined in: src/util/OptionsBuilder.ts:51

Snapshot the set fields as an independent Partial<T> (own props only).

Partial<T>

OptionsBuilder.build


withDispatcher(dispatcher): this

Defined in: src/ActorOptions.ts:134

Override the system-wide dispatcher for this actor.

Dispatcher

this


withDisplayName(displayName): this

Defined in: src/ActorOptions.ts:159

Name this actor in logs and the DevTools tree — see ActorOptionsType.displayName.

string

this


withEntity(entity): this

Defined in: src/ActorOptions.ts:164

Give this actor a sharding identity — see ActorOptionsType.entity.

EntityContext

this


withInternal(internal?): this

Defined in: src/ActorOptions.ts:154

Mark this actor as tooling — see ActorOptionsType.internal.

boolean = true

this


withMailbox(mailbox): this

Defined in: src/ActorOptions.ts:149

Full control over the queue — any Mailbox subclass.

MailboxFactory<TMessage>

this


withMailboxCapacity(mailboxCapacity): this

Defined in: src/ActorOptions.ts:139

Lower (or raise) the default bounded mailbox’s ceiling.

number

this


withMailboxOverflow(mailboxOverflow): this

Defined in: src/ActorOptions.ts:144

What a full mailbox does — see ActorOptionsType.mailboxOverflow.

BoundedMailboxOverflow

this


withSupervisorStrategy(supervisorStrategy): this

Defined in: src/ActorOptions.ts:129

How the parent supervises this actor — see ActorOptionsType.supervisorStrategy.

SupervisorStrategy

this


static create<TMessage>(): ActorOptionsBuilder<TMessage>

Defined in: src/ActorOptions.ts:124

Start a fresh builder. Equivalent to new ActorOptionsBuilder().

TMessage = unknown

ActorOptionsBuilder<TMessage>