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.
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”T
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ClusterSingletonManagerOptionsBuilder<
T>():ClusterSingletonManagerOptionsBuilder<T>
Returns
Section titled “Returns”ClusterSingletonManagerOptionsBuilder<T>
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”build()
Section titled “build()”build():
Partial<T>
Defined in: src/util/OptionsBuilder.ts:51
Snapshot the set fields as an independent Partial<T> (own props only).
Returns
Section titled “Returns”Partial<T>
Inherited from
Section titled “Inherited from”withAcquireRetryIntervalMs()
Section titled “withAcquireRetryIntervalMs()”withAcquireRetryIntervalMs(
ms):this
Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:67
Retry interval (ms) for lease.acquire() after a failed attempt. Default 5 s.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
withCluster()
Section titled “withCluster()”withCluster(
cluster):this
Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:37
The cluster this manager lives in — drives membership + leadership.
Parameters
Section titled “Parameters”cluster
Section titled “cluster”Returns
Section titled “Returns”this
withLease()
Section titled “withLease()”withLease(
lease):this
Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:62
Split-brain protection — the leader acquires this lease before spawning.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”this
withRole()
Section titled “withRole()”withRole(
role):this
Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:57
Only nodes carrying this role tag will host the singleton.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
withSingletonActor()
Section titled “withSingletonActor()”withSingletonActor(
singletonActor):this
Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:47
The singleton actor. Only instantiated on the leader.
Parameters
Section titled “Parameters”singletonActor
Section titled “singletonActor”Returns
Section titled “Returns”this
withSingletonActorOptions()
Section titled “withSingletonActorOptions()”withSingletonActorOptions(
singletonActorOptions):this
Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:52
Spawn options for the singleton instance.
Parameters
Section titled “Parameters”singletonActorOptions
Section titled “singletonActorOptions”ActorOptions<T>
Returns
Section titled “Returns”this
withTypeName()
Section titled “withTypeName()”withTypeName(
typeName):this
Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:42
Logical name for this singleton; also used as the child-actor name.
Parameters
Section titled “Parameters”typeName
Section titled “typeName”string
Returns
Section titled “Returns”this
create()
Section titled “create()”
staticcreate<T>():ClusterSingletonManagerOptionsBuilder<T>
Defined in: src/cluster/singleton/ClusterSingletonManagerOptions.ts:32
Start a fresh builder.
Type Parameters
Section titled “Type Parameters”T
Returns
Section titled “Returns”ClusterSingletonManagerOptionsBuilder<T>
