Search Results for

    Show / Hide Table of Contents

    Class UntypedPersistentActor

    Persistent actor - can be used to implement command or eventsourcing.

    Inheritance
    object
    ActorBase
    Eventsourced
    UntypedPersistentActor
    ReceivePersistentActor
    Implements
    IInternalActor
    IPersistentIdentity
    IPersistenceStash
    IWithUnboundedStash
    IWithUnrestrictedStash
    IActorStash
    IRequiresMessageQueue<IUnboundedDequeBasedMessageQueueSemantics>
    IPersistenceRecovery
    Inherited Members
    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 UntypedPersistentActor : Eventsourced, IInternalActor, IPersistentIdentity, IPersistenceStash, IWithUnboundedStash, IWithUnrestrictedStash, IActorStash, IRequiresMessageQueue<IUnboundedDequeBasedMessageQueueSemantics>, IPersistenceRecovery

    Properties

    | Edit this page View Source

    Context

    TBD

    Declaration
    protected static IUntypedActorContext Context { get; }
    Property Value
    Type Description
    IUntypedActorContext

    Methods

    | Edit this page View Source

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

    | Edit this page View Source

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

    Declaration
    protected void BecomeStacked(UntypedReceive receive)
    Parameters
    Type Name Description
    UntypedReceive receive

    The new message handler.

    | Edit this page View Source

    OnCommand(object)

    TBD

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

    TBD

    | Edit this page View Source

    OnRecover(object)

    TBD

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

    TBD

    | Edit this page View Source

    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
    ActorBase.Receive(object)
    | Edit this page View Source

    ReceiveCommand(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
    Eventsourced.ReceiveCommand(object)
    | Edit this page View Source

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

    Overrides
    Eventsourced.ReceiveRecover(object)

    Implements

    IInternalActor
    IPersistentIdentity
    IPersistenceStash
    IWithUnboundedStash
    IWithUnrestrictedStash
    IActorStash
    IRequiresMessageQueue<T>
    IPersistenceRecovery

    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