Skip to content

StashBuffer

Defined in: src/typed/Behavior.ts:70

Lightweight stash interface handed to Behaviors.withStash factories. Thin wrapper over the OO context.stash() API so the typed DSL keeps the same guarantees (FIFO, capacity, overflow error).

T

readonly isEmpty: boolean

Defined in: src/typed/Behavior.ts:76

True if the buffer holds any message.


readonly isFull: boolean

Defined in: src/typed/Behavior.ts:78

True if the buffer is at capacity.


readonly size: number

Defined in: src/typed/Behavior.ts:80

Current number of stashed messages.

stash(message): void

Defined in: src/typed/Behavior.ts:72

Stash the current message; must be called during a user message.

T

void


unstashAll(): void

Defined in: src/typed/Behavior.ts:74

Replay the buffered messages back onto the mailbox.

void