Aller au contenu
Français

BoundedMailboxOptionsBuilder

Ce contenu n’est pas encore disponible dans votre langue.

Defined in: src/mailbox/BoundedMailboxOptions.ts:36

Fluent builder for BoundedMailboxOptionsType:

new BoundedMailbox(BoundedMailboxOptions.create()
.withCapacity(1000)
.withOverflow('drop-head'));

new BoundedMailboxOptionsBuilder(): BoundedMailboxOptionsBuilder

BoundedMailboxOptionsBuilder

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


withCapacity(capacity): this

Defined in: src/mailbox/BoundedMailboxOptions.ts:43

Maximum queued user messages. Must be >= 1.

number

this


withOnDrop(onDrop): this

Defined in: src/mailbox/BoundedMailboxOptions.ts:53

Hook fired on each overflow drop (for metrics).

(reason) => void

this


withOverflow(overflow): this

Defined in: src/mailbox/BoundedMailboxOptions.ts:48

What to do when a message arrives on a full mailbox. Default reject.

BoundedMailboxOverflow

this


static create(): BoundedMailboxOptionsBuilder

Defined in: src/mailbox/BoundedMailboxOptions.ts:38

Start a fresh builder.

BoundedMailboxOptionsBuilder