StartSingletonOptionsBuilder
Este conteúdo não está disponível em sua língua ainda.
Defined in: src/cluster/singleton/StartSingletonOptions.ts:68
Fluent builder for StartSingletonOptionsType:
system.extension(ClusterSingletonId).start( cluster, StartSingletonOptions.create<Command>() .withTypeName('counter') .withActor(CounterActor),);Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”T
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new StartSingletonOptionsBuilder<
T>():StartSingletonOptionsBuilder<T>
Returns
Section titled “Returns”StartSingletonOptionsBuilder<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/StartSingletonOptions.ts:100
Retry interval (ms) for lease.acquire() after a failed attempt. Default 5 s.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
withActor()
Section titled “withActor()”withActor(
actor):this
Defined in: src/cluster/singleton/StartSingletonOptions.ts:80
The actor the singleton is built from. Only instantiated on the leader.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”this
withActorOptions()
Section titled “withActorOptions()”withActorOptions(
actorOptions):this
Defined in: src/cluster/singleton/StartSingletonOptions.ts:85
Spawn options for the singleton instance.
Parameters
Section titled “Parameters”actorOptions
Section titled “actorOptions”ActorOptions<T>
Returns
Section titled “Returns”this
withBufferSize()
Section titled “withBufferSize()”withBufferSize(
messages):this
Defined in: src/cluster/singleton/StartSingletonOptions.ts:105
Messages the proxy buffers while no node hosts the singleton. Default 1000.
Parameters
Section titled “Parameters”messages
Section titled “messages”number
Returns
Section titled “Returns”this
withLease()
Section titled “withLease()”withLease(
lease):this
Defined in: src/cluster/singleton/StartSingletonOptions.ts:95
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/StartSingletonOptions.ts:90
Only nodes carrying this role tag will host the singleton.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
withTypeName()
Section titled “withTypeName()”withTypeName(
typeName):this
Defined in: src/cluster/singleton/StartSingletonOptions.ts:75
Logical name for this singleton — used in the manager/child actor path.
Parameters
Section titled “Parameters”typeName
Section titled “typeName”string
Returns
Section titled “Returns”this
create()
Section titled “create()”
staticcreate<T>():StartSingletonOptionsBuilder<T>
Defined in: src/cluster/singleton/StartSingletonOptions.ts:70
Start a fresh builder.
Type Parameters
Section titled “Type Parameters”T
Returns
Section titled “Returns”StartSingletonOptionsBuilder<T>
