Interface IStash
Public interface used to expose stash capabilities to user-level actors
Namespace: Akka.Actor
Assembly: Akka.dll
Syntax
public interface IStash
Properties
| Improve this Doc View SourceCapacity
The total capacity of the stash.
Declaration
int Capacity { get; }
Property Value
Type | Description |
---|---|
Int32 |
Count
The number of messages currently inside the stash.
Declaration
int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
IsEmpty
Returns true
when Count is zero.
Declaration
bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsFull
When using a bounded stash, this returns true
when the stash is full.
Declaration
bool IsFull { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Always returns false
when using an unbounded stash.
NonEmpty
Returns true
when Count is greater than zero.
Declaration
bool NonEmpty { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc 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 | TBD |
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, Boolean>)
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, Boolean> | predicate | TBD |