Interface IStash
Public interface used to expose stash capabilities to user-level actors
Namespace: Akka.Actor
Assembly: Akka.dll
Syntax
public interface IStash
Properties
| Edit this page View SourceCapacity
The total capacity of the stash.
Declaration
int Capacity { get; }
Property Value
| Type | Description |
|---|---|
| int |
Count
The number of messages currently inside the stash.
Declaration
int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
IsEmpty
Declaration
bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsFull
When using a bounded stash, this returns true when the stash is full.
Declaration
bool IsFull { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
Always returns false when using an unbounded stash.
NonEmpty
Declaration
bool NonEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceClearStash()
Returns all messages and clears the stash. The stash is guaranteed to be empty afterwards.
Declaration
IEnumerable<Envelope> ClearStash()
Returns
| Type | Description |
|---|---|
| IEnumerable<Envelope> | The previous stashed messages. |
Prepend(IEnumerable<Envelope>)
Prepend a set of envelopes to the front of the stash.
Declaration
void Prepend(IEnumerable<Envelope> envelopes)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<Envelope> | envelopes | The collection of Envelope messages to insert at the front of the stash. |
Stash()
Stashes the current message (the message that the actor received last)
Declaration
void Stash()
Unstash()
Unstash the oldest message in the stash and prepends it to the actor's mailbox. The message is removed from the stash.
Declaration
void Unstash()
UnstashAll()
Unstashes all messages by prepending them to the actor's mailbox. The stash is guaranteed to be empty afterwards.
Declaration
void UnstashAll()
UnstashAll(Func<Envelope, bool>)
Unstashes all messages selected by the predicate function. Other messages are discarded. The stash is guaranteed to be empty afterwards.
Declaration
void UnstashAll(Func<Envelope, bool> predicate)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<Envelope, bool> | predicate | A filter applied to each stashed Envelope. Only messages for which this returns true are prepended to the mailbox; the rest are discarded. |
Edit this page