Skip to content

Type Alias: SynchronizedOptions ​

SynchronizedOptions = object

The options of Synchronized: the lock component used, and how the lock is waited for and held.

Properties ​

mutex? ​

optional mutex?: string

The name under which the Mutex component is registered, resolved from the controller's container.

Default ​

ts
'mutex'

timeout? ​

optional timeout?: number

How long the request waits for the lock, in milliseconds, before failing with a MutexTimeoutException. Ignored when wait is false.

Default ​

the component's timeout option (10000)


ttl? ​

optional ttl?: number

How long the lock stays held without a renewal, in milliseconds (renewed automatically while the action runs).

Default ​

the component's ttl option (30000)


wait? ​

optional wait?: boolean

Whether to wait for the lock; false fails the request at once with a MutexTimeoutException (HTTP 409) when another request holds the lock.

Default ​

ts
true

Released under the MIT License.