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
| Improve this Doc View SourceContext
TBD
Declaration
protected static IUntypedActorContext Context { get; }
Property Value
Type | Description |
---|---|
IUntypedActorContext |
Methods
| Improve this Doc 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 |
---|---|
Boolean | TBD |
Overrides
| Improve this Doc 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 sealed override bool ReceiveCommand(object message)
Parameters
Type | Name | Description |
---|---|---|
Object | message | TBD |
Returns
Type | Description |
---|---|
Boolean | TBD |
Overrides
| Improve this Doc 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 sealed override bool ReceiveRecover(object message)
Parameters
Type | Name | Description |
---|---|---|
Object | message | TBD |
Returns
Type | Description |
---|---|
Boolean | TBD |