BoundedMailboxOptionsBuilder
Este conteúdo não está disponível em sua língua ainda.
Defined in: src/mailbox/BoundedMailboxOptions.ts:36
Fluent builder for BoundedMailboxOptionsType:
new BoundedMailbox(BoundedMailboxOptions.create() .withCapacity(1000) .withOverflow('drop-head'));Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BoundedMailboxOptionsBuilder():
BoundedMailboxOptionsBuilder
Returns
Section titled “Returns”BoundedMailboxOptionsBuilder
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”withCapacity()
Section titled “withCapacity()”withCapacity(
capacity):this
Defined in: src/mailbox/BoundedMailboxOptions.ts:43
Maximum queued user messages. Must be >= 1.
Parameters
Section titled “Parameters”capacity
Section titled “capacity”number
Returns
Section titled “Returns”this
withOnDrop()
Section titled “withOnDrop()”withOnDrop(
onDrop):this
Defined in: src/mailbox/BoundedMailboxOptions.ts:53
Hook fired on each overflow drop (for metrics).
Parameters
Section titled “Parameters”onDrop
Section titled “onDrop”(reason) => void
Returns
Section titled “Returns”this
withOverflow()
Section titled “withOverflow()”withOverflow(
overflow):this
Defined in: src/mailbox/BoundedMailboxOptions.ts:48
What to do when a message arrives on a full mailbox. Default reject.
Parameters
Section titled “Parameters”overflow
Section titled “overflow”Returns
Section titled “Returns”this
create()
Section titled “create()”
staticcreate():BoundedMailboxOptionsBuilder
Defined in: src/mailbox/BoundedMailboxOptions.ts:38
Start a fresh builder.
Returns
Section titled “Returns”BoundedMailboxOptionsBuilder
