Search Results for

    Show / Hide Table of Contents

    Class ReceivePersistentActor

    TBD

    Inheritance
    object
    ActorBase
    Eventsourced
    UntypedPersistentActor
    ReceivePersistentActor
    AtLeastOnceDeliveryReceiveActor
    Implements
    IInternalActor
    IPersistentIdentity
    IPersistenceStash
    IWithUnboundedStash
    IWithUnrestrictedStash
    IActorStash
    IRequiresMessageQueue<IUnboundedDequeBasedMessageQueueSemantics>
    IPersistenceRecovery
    IInitializableActor
    Inherited Members
    UntypedPersistentActor.Receive(object)
    UntypedPersistentActor.ReceiveCommand(object)
    UntypedPersistentActor.ReceiveRecover(object)
    UntypedPersistentActor.Become(UntypedReceive)
    UntypedPersistentActor.BecomeStacked(UntypedReceive)
    UntypedPersistentActor.Context
    Eventsourced.Extension
    Eventsourced.Log
    Eventsourced.PersistenceId
    Eventsourced.Recovery
    Eventsourced.InternalStashOverflowStrategy
    Eventsourced.Stash
    Eventsourced.JournalPluginId
    Eventsourced.SnapshotPluginId
    Eventsourced.Journal
    Eventsourced.SnapshotStore
    Eventsourced.SnapshotterId
    Eventsourced.IsRecovering
    Eventsourced.IsRecoveryFinished
    Eventsourced.LastSequenceNr
    Eventsourced.SnapshotSequenceNr
    Eventsourced.LoadSnapshot(string, SnapshotSelectionCriteria, long)
    Eventsourced.SaveSnapshot(object)
    Eventsourced.DeleteSnapshot(long)
    Eventsourced.DeleteSnapshots(SnapshotSelectionCriteria)
    Eventsourced.Persist<TEvent>(TEvent, Action<TEvent>)
    Eventsourced.PersistAll<TEvent>(IEnumerable<TEvent>, Action<TEvent>)
    Eventsourced.PersistAsync<TEvent>(TEvent, Action<TEvent>)
    Eventsourced.PersistAllAsync<TEvent>(IEnumerable<TEvent>, Action<TEvent>)
    Eventsourced.DeferAsync<TEvent>(TEvent, Action<TEvent>)
    Eventsourced.DeleteMessages(long)
    Eventsourced.OnReplaySuccess()
    Eventsourced.OnRecoveryFailure(Exception, object)
    Eventsourced.OnPersistFailure(Exception, object, long)
    Eventsourced.OnPersistRejected(Exception, object, long)
    Eventsourced.RunTask(Func<Task>)
    Eventsourced.UnstashFilterPredicate
    Eventsourced.AroundReceive(Receive, object)
    Eventsourced.AroundPreStart()
    Eventsourced.AroundPreRestart(Exception, object)
    Eventsourced.AroundPostRestart(Exception, object)
    Eventsourced.AroundPostStop()
    Eventsourced.Unhandled(object)
    ActorBase.Sender
    ActorBase.Self
    ActorBase.EmptyReceive
    ActorBase.Become(Receive)
    ActorBase.BecomeStacked(Receive)
    ActorBase.UnbecomeStacked()
    ActorBase.SetReceiveTimeout(TimeSpan?)
    ActorBase.PreStart()
    ActorBase.PreRestart(Exception, object)
    ActorBase.PostRestart(Exception)
    ActorBase.PostStop()
    ActorBase.SupervisorStrategy()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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 Source

    ReceivePersistentActor()

    Initializes a new instance of the ReceivePersistentActor class.

    Declaration
    protected ReceivePersistentActor()

    Methods

    | Edit this page View Source

    Become(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.

    | Edit this page View Source

    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() Please note, that in order to not leak memory, make sure every call to BecomeStacked(Action) is matched with a call to UnbecomeStacked().

    Declaration
    protected void BecomeStacked(Action configure)
    Parameters
    Type Name Description
    Action configure

    Configures the new handler by calling the different Command overloads.

    | Edit this page View Source

    Command(Action<object>)

    TBD

    Declaration
    protected void Command(Action<object> handler)
    Parameters
    Type Name Description
    Action<object> handler

    TBD

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    CommandAny(Action<object>)

    TBD

    Declaration
    protected void CommandAny(Action<object> handler)
    Parameters
    Type Name Description
    Action<object> handler

    TBD

    | Edit this page View Source

    CommandAnyAsync(Func<object, Task>)

    Registers an asynchronous handler for incoming command of any type. The actor will be suspended until the task returned by handler completes, including the Persist<TEvent>(TEvent, Action<TEvent>) and PersistAll<TEvent>(IEnumerable<TEvent>, Action<TEvent>) calls. This method may only be called when constructing the actor or from Become(Action) or BecomeStacked(Action). Note that handlers registered prior to this may have handled the message already. In that case, this handler will not be invoked.

    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

    | Edit this page View Source

    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. The actor will be suspended until the task returned by handler completes, including the Persist<TEvent>(TEvent, Action<TEvent>) and PersistAll<TEvent>(IEnumerable<TEvent>, Action<TEvent>) calls. This method may only be called when constructing the actor or from Become(Action) or BecomeStacked(Action). Note that handlers registered prior to this may have handled the message already. In that case, this handler will not be invoked.

    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 messageType

    Predicate<object> shouldHandle

    When not null it is used to determine if the message matches.

    | Edit this page View Source

    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. The actor will be suspended until the task returned by handler completes, including the Persist<TEvent>(TEvent, Action<TEvent>) and PersistAll<TEvent>(IEnumerable<TEvent>, Action<TEvent>) calls. This method may only be called when constructing the actor or from Become(Action) or BecomeStacked(Action). Note that handlers registered prior to this may have handled the message already. In that case, this handler will not be invoked.

    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 null it is used to determine if the message matches.

    Func<object, Task> handler

    The message handler that is invoked for incoming messages of the specified type messageType

    | Edit this page View Source

    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. The actor will be suspended until the task returned by handler completes, including the Persist<TEvent>(TEvent, Action<TEvent>) and PersistAll<TEvent>(IEnumerable<TEvent>, Action<TEvent>) calls. This method may only be called when constructing the actor or from Become(Action) or BecomeStacked(Action). Note that handlers registered prior to this may have handled the message already. In that case, this handler will not be invoked.

    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 T

    Predicate<T> shouldHandle

    When not null it is used to determine if the message matches.

    Type Parameters
    Name Description
    T

    The type of the message

    | Edit this page View Source

    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. The actor will be suspended until the task returned by handler completes, including the Persist<TEvent>(TEvent, Action<TEvent>) and PersistAll<TEvent>(IEnumerable<TEvent>, Action<TEvent>) calls. This method may only be called when constructing the actor or from Become(Action) or BecomeStacked(Action). Note that handlers registered prior to this may have handled the message already. In that case, this handler will not be invoked.

    Declaration
    protected void CommandAsync<T>(Predicate<T> shouldHandle, Func<T, Task> handler)
    Parameters
    Type Name Description
    Predicate<T> shouldHandle

    When not null it is used to determine if the message matches.

    Func<T, Task> handler

    The message handler that is invoked for incoming messages of the specified type T

    Type Parameters
    Name Description
    T

    The type of the message

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    OnCommand(object)

    TBD

    Declaration
    protected override sealed void OnCommand(object message)
    Parameters
    Type Name Description
    object message

    TBD

    Overrides
    UntypedPersistentActor.OnCommand(object)
    | Edit this page View Source

    OnRecover(object)

    TBD

    Declaration
    protected override sealed void OnRecover(object message)
    Parameters
    Type Name Description
    object message

    TBD

    Overrides
    UntypedPersistentActor.OnRecover(object)
    | Edit this page View Source

    Recover(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

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    RecoverAny(Action<object>)

    TBD

    Declaration
    protected void RecoverAny(Action<object> handler)
    Parameters
    Type Name Description
    Action<object> handler

    TBD

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    Implements

    IInternalActor
    IPersistentIdentity
    IPersistenceStash
    IWithUnboundedStash
    IWithUnrestrictedStash
    IActorStash
    IRequiresMessageQueue<T>
    IPersistenceRecovery
    IInitializableActor

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET