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
| Improve this Doc View SourceReceivePersistentActor()
Initializes a new instance of the ReceivePersistentActor class.
Declaration
protected ReceivePersistentActor()
Methods
| Improve this Doc 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, Boolean>)
TBD
Declaration
protected void Command(Type messageType, Func<object, bool> handler)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | TBD |
Func<Object, Boolean> | 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 |
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, Boolean>)
TBD
Declaration
protected void Command<T>(Func<T, bool> handler)
Parameters
Type | Name | Description |
---|---|---|
Func<T, Boolean> | 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 |
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 |
OnCommand(Object)
TBD
Declaration
protected sealed override void OnCommand(object message)
Parameters
Type | Name | Description |
---|---|---|
Object | message | TBD |
Overrides
| Improve this Doc View SourceOnRecover(Object)
TBD
Declaration
protected sealed override void OnRecover(object message)
Parameters
Type | Name | Description |
---|---|---|
Object | message | TBD |
Overrides
| Improve this Doc 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, Boolean>)
TBD
Declaration
protected void Recover(Type messageType, Func<object, bool> handler)
Parameters
Type | Name | Description |
---|---|---|
Type | messageType | TBD |
Func<Object, Boolean> | 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 |
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, Boolean>)
TBD
Declaration
protected void Recover<T>(Func<T, bool> handler)
Parameters
Type | Name | Description |
---|---|---|
Func<T, Boolean> | 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 |
RecoverAny(Action<Object>)
TBD
Declaration
protected void RecoverAny(Action<object> handler)
Parameters
Type | Name | Description |
---|---|---|
Action<Object> | handler | TBD |
Explicit Interface Implementations
| Improve this Doc View SourceIInitializableActor.Init()
Declaration
void IInitializableActor.Init()