コンテンツにスキップ
日本語

ClusterSingletonManagerOptionsBuilder

このコンテンツはまだ日本語訳がありません。

Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:30

Fluent builder for ClusterSingletonManagerOptionsType. The manager is constructed directly by the ClusterSingleton extension, so callers rarely build this by hand — but the builder keeps the construction API uniform with the rest of the cluster layer.

T

new ClusterSingletonManagerOptionsBuilder<T>(): ClusterSingletonManagerOptionsBuilder<T>

ClusterSingletonManagerOptionsBuilder<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/ClusterSingletonManagerOptions.ts:67

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

number

this


withCluster(cluster): this

Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:37

The cluster this manager lives in — drives membership + leadership.

Cluster

this


withLease(lease): this

Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:62

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

Lease

this


withRole(role): this

Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:57

Only nodes carrying this role tag will host the singleton.

string

this


withSingletonActor(singletonActor): this

Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:47

The singleton actor. Only instantiated on the leader.

ActorClassOrFactory<T>

this


withSingletonActorOptions(singletonActorOptions): this

Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:52

Spawn options for the singleton instance.

ActorOptions<T>

this


withTypeName(typeName): this

Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:42

Logical name for this singleton; also used as the child-actor name.

string

this


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

Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:32

Start a fresh builder.

T

ClusterSingletonManagerOptionsBuilder<T>