Nexus API Reference

StashBuffer

Tags
psalm-api

Bounded stash buffer for actors.

Stashed envelopes are replayed inline when unstashAll() is called, guaranteeing that stashed messages are processed before new messages.

template

Table of Contents

Methods

capacity()  : int
isEmpty()  : bool
isFull()  : bool
size()  : int
stash()  : void
Stash the given envelope for later replay.
unstashAll()  : Behavior<string|int, T>
Replay all stashed envelopes through the target behavior, then continue with it.

Methods

capacity()

public capacity() : int
Return values
int

isEmpty()

public isEmpty() : bool
Return values
bool

unstashAll()

Replay all stashed envelopes through the target behavior, then continue with it.

public unstashAll(Behavior<string|int, T$targetBehavior) : Behavior<string|int, T>

If the buffer is empty, returns the target behavior directly. Otherwise, returns a special behavior that ActorCell will recognize and replay inline.

Parameters
$targetBehavior : Behavior<string|int, T>
Return values
Behavior<string|int, T>
On this page

Search results