콘텐츠로 이동
한국어

StartSingletonOptionsBuilder

이 콘텐츠는 아직 번역되지 않았습니다.

Defined in: src/cluster/singleton/StartSingletonOptions.ts:68

Fluent builder for StartSingletonOptionsType:

system.extension(ClusterSingletonId).start(
cluster,
StartSingletonOptions.create<Command>()
.withTypeName('counter')
.withActor(CounterActor),
);

T

new StartSingletonOptionsBuilder<T>(): StartSingletonOptionsBuilder<T>

StartSingletonOptionsBuilder<T>

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


withAcquireRetryIntervalMs(ms): this

Defined in: src/cluster/singleton/StartSingletonOptions.ts:100

Retry interval (ms) for lease.acquire() after a failed attempt. Default 5 s.

number

this


withActor(actor): this

Defined in: src/cluster/singleton/StartSingletonOptions.ts:80

The actor the singleton is built from. Only instantiated on the leader.

ActorClassOrFactory<T>

this


withActorOptions(actorOptions): this

Defined in: src/cluster/singleton/StartSingletonOptions.ts:85

Spawn options for the singleton instance.

ActorOptions<T>

this


withBufferSize(messages): this

Defined in: src/cluster/singleton/StartSingletonOptions.ts:105

Messages the proxy buffers while no node hosts the singleton. Default 1000.

number

this


withLease(lease): this

Defined in: src/cluster/singleton/StartSingletonOptions.ts:95

Split-brain protection — the leader acquires this lease before spawning.

Lease

this


withRole(role): this

Defined in: src/cluster/singleton/StartSingletonOptions.ts:90

Only nodes carrying this role tag will host the singleton.

string

this


withTypeName(typeName): this

Defined in: src/cluster/singleton/StartSingletonOptions.ts:75

Logical name for this singleton — used in the manager/child actor path.

string

this


static create<T>(): StartSingletonOptionsBuilder<T>

Defined in: src/cluster/singleton/StartSingletonOptions.ts:70

Start a fresh builder.

T

StartSingletonOptionsBuilder<T>