Stash docs: add paragraphs about performance and restarts
This commit is contained in:
parent
1f1f31f11c
commit
8a88edc302
2 changed files with 16 additions and 0 deletions
|
|
@ -599,6 +599,14 @@ mailbox). In case a bounded mailbox overflows, a
|
||||||
``MessageQueueAppendFailedException`` is thrown.
|
``MessageQueueAppendFailedException`` is thrown.
|
||||||
The stash is guaranteed to be empty after calling ``unstashAll()``.
|
The stash is guaranteed to be empty after calling ``unstashAll()``.
|
||||||
|
|
||||||
|
The stash is backed by a ``scala.collection.immutable.Vector``. As a
|
||||||
|
result, even a very large number of messages may be stashed without a
|
||||||
|
major impact on performance.
|
||||||
|
|
||||||
|
Note that the stash is not persisted across restarts of an actor,
|
||||||
|
unlike the actor's mailbox. Therefore, it should be managed like other
|
||||||
|
parts of the actor's state which have the same property.
|
||||||
|
|
||||||
|
|
||||||
Killing an Actor
|
Killing an Actor
|
||||||
================
|
================
|
||||||
|
|
|
||||||
|
|
@ -660,6 +660,10 @@ mailbox). In case a bounded mailbox overflows, a
|
||||||
``MessageQueueAppendFailedException`` is thrown.
|
``MessageQueueAppendFailedException`` is thrown.
|
||||||
The stash is guaranteed to be empty after calling ``unstashAll()``.
|
The stash is guaranteed to be empty after calling ``unstashAll()``.
|
||||||
|
|
||||||
|
The stash is backed by a ``scala.collection.immutable.Vector``. As a
|
||||||
|
result, even a very large number of messages may be stashed without a
|
||||||
|
major impact on performance.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
Note that the ``Stash`` trait must be mixed into (a subclass of) the
|
Note that the ``Stash`` trait must be mixed into (a subclass of) the
|
||||||
|
|
@ -667,6 +671,10 @@ The stash is guaranteed to be empty after calling ``unstashAll()``.
|
||||||
callback. This means it's not possible to write
|
callback. This means it's not possible to write
|
||||||
``Actor with MyActor with Stash`` if ``MyActor`` overrides ``preRestart``.
|
``Actor with MyActor with Stash`` if ``MyActor`` overrides ``preRestart``.
|
||||||
|
|
||||||
|
Note that the stash is not persisted across restarts of an actor,
|
||||||
|
unlike the actor's mailbox. Therefore, it should be managed like other
|
||||||
|
parts of the actor's state which have the same property.
|
||||||
|
|
||||||
|
|
||||||
Killing an Actor
|
Killing an Actor
|
||||||
================
|
================
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue