Class ReceivePersistentActor
TBD
Inheritance
Implements
Inherited Members
Namespace: Akka.Persistence
Assembly: Akka.Persistence.dll
Syntax
public abstract class ReceivePersistentActor : UntypedPersistentActor, IInternalActor, IPersistentIdentity, IPersistenceStash, IWithUnboundedStash, IWithUnrestrictedStash, IActorStash, IRequiresMessageQueue<IUnboundedDequeBasedMessageQueueSemantics>, IPersistenceRecovery, IInitializableActor
Constructors
| Edit this page View SourceReceivePersistentActor()
Initializes a new instance of the ReceivePersistentActor class.
Declaration
protected ReceivePersistentActor()
Methods
| Edit this page View SourceBecome(Action)
Changes the actor's command behavior and replaces the current receive command handler with the specified handler.
Declaration
protected void Become(Action configure)
Parameters
Type | Name | Description |
---|---|---|
Action | configure | Configures the new handler by calling the different Receive overloads. |
BecomeStacked(Action)
Changes the actor's command behavior and replaces the current receive command 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(Action configure)
Parameters
Type | Name | Description |
---|---|---|
Action | configure | Configures the new handler by calling the different Command overloads. |
Command(Action<object>)
TBD
Declaration
protected void Command(Action<object> handler)
Parameters
Type | Name | Description |
---|---|---|
Action<object> | handler | TBD |
Command(Type, Action<object>, Predicate<object>)
TBD
Declaration
protected void Command(Type messageType, Action<object> handler, Predicate<object> shouldHandle = null)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | TBD |
Action<object> | handler | TBD |
Predicate<object> | shouldHandle | TBD |
Command(Type, Func<object, bool>)
TBD
Declaration
protected void Command(Type messageType, Func<object, bool> handler)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | TBD |
Func<object, bool> | handler | TBD |
Command(Type, Predicate<object>, Action<object>)
TBD
Declaration
protected void Command(Type messageType, Predicate<object> shouldHandle, Action<object> handler)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | TBD |
Predicate<object> | shouldHandle | TBD |
Action<object> | handler | TBD |
CommandAny(Action<object>)
TBD
Declaration
protected void CommandAny(Action<object> handler)
Parameters
Type | Name | Description |
---|---|---|
Action<object> | handler | TBD |
CommandAnyAsync(Func<object, Task>)
Registers an asynchronous handler for incoming command of any type.
handler
completes, including the Persist<TEvent>(TEvent, Action<TEvent>) and
PersistAll<TEvent>(IEnumerable<TEvent>, Action<TEvent>) calls.
Declaration
protected void CommandAnyAsync(Func<object, Task> handler)
Parameters
Type | Name | Description |
---|---|---|
Func<object, Task> | handler | The message handler that is invoked for incoming messages of any type |
CommandAsync(Type, Func<object, Task>, Predicate<object>)
Registers an asynchronous handler for incoming command of the specified type messageType
.
If shouldHandle
!=null
then it must return true before a message is passed to handler
.
handler
completes, including the Persist<TEvent>(TEvent, Action<TEvent>) and
PersistAll<TEvent>(IEnumerable<TEvent>, Action<TEvent>) calls.
Declaration
protected void CommandAsync(Type messageType, Func<object, Task> handler, Predicate<object> shouldHandle = null)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | The type of the message |
Func<object, Task> | handler | The message handler that is invoked for incoming messages of the specified type |
Predicate<object> | shouldHandle | When not |
CommandAsync(Type, Predicate<object>, Func<object, Task>)
Registers an asynchronous handler for incoming command of the specified type messageType
.
If shouldHandle
!=null
then it must return true before a message is passed to handler
.
handler
completes, including the Persist<TEvent>(TEvent, Action<TEvent>) and
PersistAll<TEvent>(IEnumerable<TEvent>, Action<TEvent>) calls.
Declaration
protected void CommandAsync(Type messageType, Predicate<object> shouldHandle, Func<object, Task> handler)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | The type of the message |
Predicate<object> | shouldHandle | When not |
Func<object, Task> | handler | The message handler that is invoked for incoming messages of the specified type |
CommandAsync<T>(Func<T, Task>, Predicate<T>)
Registers an asynchronous handler for incoming command of the specified type T
.
If shouldHandle
!=null
then it must return true before a message is passed to handler
.
handler
completes, including the Persist<TEvent>(TEvent, Action<TEvent>) and
PersistAll<TEvent>(IEnumerable<TEvent>, Action<TEvent>) calls.
Declaration
protected void CommandAsync<T>(Func<T, Task> handler, Predicate<T> shouldHandle = null)
Parameters
Type | Name | Description |
---|---|---|
Func<T, Task> | handler | The message handler that is invoked for incoming messages of the specified type |
Predicate<T> | shouldHandle | When not |
Type Parameters
Name | Description |
---|---|
T | The type of the message |
CommandAsync<T>(Predicate<T>, Func<T, Task>)
Registers an asynchronous handler for incoming command of the specified type T
.
If shouldHandle
!=null
then it must return true before a message is passed to handler
.
handler
completes, including the Persist<TEvent>(TEvent, Action<TEvent>) and
PersistAll<TEvent>(IEnumerable<TEvent>, Action<TEvent>) calls.
Declaration
protected void CommandAsync<T>(Predicate<T> shouldHandle, Func<T, Task> handler)
Parameters
Type | Name | Description |
---|---|---|
Predicate<T> | shouldHandle | When not |
Func<T, Task> | handler | The message handler that is invoked for incoming messages of the specified type |
Type Parameters
Name | Description |
---|---|
T | The type of the message |
Command<T>(Action<T>, Predicate<T>)
TBD
Declaration
protected void Command<T>(Action<T> handler, Predicate<T> shouldHandle = null)
Parameters
Type | Name | Description |
---|---|---|
Action<T> | handler | TBD |
Predicate<T> | shouldHandle | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Command<T>(Func<T, bool>)
TBD
Declaration
protected void Command<T>(Func<T, bool> handler)
Parameters
Type | Name | Description |
---|---|---|
Func<T, bool> | handler | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Command<T>(Predicate<T>, Action<T>)
TBD
Declaration
protected void Command<T>(Predicate<T> shouldHandle, Action<T> handler)
Parameters
Type | Name | Description |
---|---|---|
Predicate<T> | shouldHandle | TBD |
Action<T> | handler | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
OnCommand(object)
TBD
Declaration
protected override sealed void OnCommand(object message)
Parameters
Type | Name | Description |
---|---|---|
object | message | TBD |
Overrides
| Edit this page View SourceOnRecover(object)
TBD
Declaration
protected override sealed void OnRecover(object message)
Parameters
Type | Name | Description |
---|---|---|
object | message | TBD |
Overrides
| Edit this page View SourceRecover(Type, Action<object>, Predicate<object>)
TBD
Declaration
protected void Recover(Type messageType, Action<object> handler, Predicate<object> shouldHandle = null)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | TBD |
Action<object> | handler | TBD |
Predicate<object> | shouldHandle | TBD |
Recover(Type, Func<object, bool>)
TBD
Declaration
protected void Recover(Type messageType, Func<object, bool> handler)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | TBD |
Func<object, bool> | handler | TBD |
Recover(Type, Predicate<object>, Action<object>)
TBD
Declaration
protected void Recover(Type messageType, Predicate<object> shouldHandle, Action<object> handler)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | TBD |
Predicate<object> | shouldHandle | TBD |
Action<object> | handler | TBD |
RecoverAny(Action<object>)
TBD
Declaration
protected void RecoverAny(Action<object> handler)
Parameters
Type | Name | Description |
---|---|---|
Action<object> | handler | TBD |
Recover<T>(Action<T>, Predicate<T>)
TBD
Declaration
protected void Recover<T>(Action<T> handler, Predicate<T> shouldHandle = null)
Parameters
Type | Name | Description |
---|---|---|
Action<T> | handler | TBD |
Predicate<T> | shouldHandle | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Recover<T>(Func<T, bool>)
TBD
Declaration
protected void Recover<T>(Func<T, bool> handler)
Parameters
Type | Name | Description |
---|---|---|
Func<T, bool> | handler | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |
Recover<T>(Predicate<T>, Action<T>)
TBD
Declaration
protected void Recover<T>(Predicate<T> shouldHandle, Action<T> handler)
Parameters
Type | Name | Description |
---|---|---|
Predicate<T> | shouldHandle | TBD |
Action<T> | handler | TBD |
Type Parameters
Name | Description |
---|---|
T | TBD |