Class StashFactory
Static factor used for creating Stash instances
Inherited Members
Namespace: Akka.Actor
Assembly: Akka.dll
Syntax
public static class StashFactory
Methods
| Edit this page View SourceCreateStash(IActorContext, IActorStash)
Creates a new IStash for the given actorInstance.
The stash type is determined by which IActorStash sub-interface the actor implements.
Declaration
public static IStash CreateStash(this IActorContext context, IActorStash actorInstance)
Parameters
| Type | Name | Description |
|---|---|---|
| IActorContext | context | The actor context used to configure the stash and its underlying mailbox. |
| IActorStash | actorInstance | The actor instance whose runtime type determines the stash variant. |
Returns
| Type | Description |
|---|---|
| IStash | A new IStash instance appropriate for the actor type. |
CreateStash(IActorContext, Type)
Creates a new IStash for the given actorType.
Returns a BoundedStashImpl for IWithBoundedStash,
an UnboundedStashImpl for IWithUnboundedStash,
or an unrestricted stash for IWithUnrestrictedStash.
Declaration
public static IStash CreateStash(this IActorContext context, Type actorType)
Parameters
| Type | Name | Description |
|---|---|---|
| IActorContext | context | The actor context used to configure the stash and its underlying mailbox. |
| Type | actorType | The actor Type. Must implement a sub-interface of IActorStash. |
Returns
| Type | Description |
|---|---|
| IStash | A new IStash instance appropriate for the actor type. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | This exception is thrown if the given |
CreateStash<T>(IActorContext)
Creates a new IStash for the actor type T using the given context.
The stash type (bounded, unbounded, or unrestricted) is determined by which IActorStash
sub-interface T implements.
Declaration
public static IStash CreateStash<T>(this IActorContext context) where T : ActorBase
Parameters
| Type | Name | Description |
|---|---|---|
| IActorContext | context | The actor context used to configure the stash and its underlying mailbox. |
Returns
| Type | Description |
|---|---|
| IStash | A new IStash instance appropriate for the actor type. |
Type Parameters
| Name | Description |
|---|---|
| T | The actor type. Must implement a sub-interface of IActorStash. |
Edit this page