Class UntypedPersistentActor
Persistent actor - can be used to implement command or eventsourcing.
Implements
Inherited Members
Namespace: Akka.Persistence
Assembly: Akka.Persistence.dll
Syntax
public abstract class UntypedPersistentActor : Eventsourced, IInternalActor, IPersistentIdentity, IPersistenceStash, IWithUnboundedStash, IWithUnrestrictedStash, IActorStash, IRequiresMessageQueue<IUnboundedDequeBasedMessageQueueSemantics>, IPersistenceRecovery
Properties
| Edit this page View SourceContext
TBD
Declaration
protected static IUntypedActorContext Context { get; }
Property Value
| Type | Description |
|---|---|
| IUntypedActorContext |
Methods
| Edit this page View SourceBecome(UntypedReceive)
Changes the actor's behavior and replaces the current receive handler with the specified handler.
Declaration
protected void Become(UntypedReceive receive)
Parameters
| Type | Name | Description |
|---|---|---|
| UntypedReceive | receive | The new message handler. |
BecomeStacked(UntypedReceive)
Changes the actor's behavior and replaces the current receive handler with the specified handler.
The current handler is stored on a stack, and you can revert to it by calling UnbecomeStacked()
Declaration
protected void BecomeStacked(UntypedReceive receive)
Parameters
| Type | Name | Description |
|---|---|---|
| UntypedReceive | receive | The new message handler. |
OnCommand(object)
TBD
Declaration
protected abstract void OnCommand(object message)
Parameters
| Type | Name | Description |
|---|---|---|
| object | message | TBD |
OnRecover(object)
TBD
Declaration
protected abstract void OnRecover(object message)
Parameters
| Type | Name | Description |
|---|---|---|
| object | message | TBD |
Receive(object)
Processor for user defined messages.
Declaration
protected override bool Receive(object message)
Parameters
| Type | Name | Description |
|---|---|---|
| object | message | The message. |
Returns
| Type | Description |
|---|---|
| bool | TBD |
Overrides
| Edit this page View SourceReceiveCommand(object)
Command handler. Typically validates commands against current state - possibly by communicating with other actors. On successful validation, one or more events are derived from command and persisted.
Declaration
protected override sealed bool ReceiveCommand(object message)
Parameters
| Type | Name | Description |
|---|---|---|
| object | message | TBD |
Returns
| Type | Description |
|---|---|
| bool | TBD |
Overrides
| Edit this page View SourceReceiveRecover(object)
Recovery handler that receives persistent events during recovery. If a state snapshot has been captured and saved, this handler will receive a SnapshotOffer message followed by events that are younger than offer itself.
This handler must not have side-effects other than changing persistent actor state i.e. it should not perform actions that may fail, such as interacting with external services, for example.
If there is a problem with recovering the state of the actor from the journal, the error will be logged and the actor will be stopped.
Declaration
protected override sealed bool ReceiveRecover(object message)
Parameters
| Type | Name | Description |
|---|---|---|
| object | message | TBD |
Returns
| Type | Description |
|---|---|
| bool | TBD |
Edit this page