Search Results for

    Show / Hide Table of Contents

    Class Recovery

    Recovery mode configuration object to be return in Recovery

    By default recovers from latest snapshot replays through to the last available event (last sequenceNr).

    Recovery will start from a snapshot if the persistent actor has previously saved one or more snapshots and at least one of these snapshots matches the specified FromSnapshot criteria. Otherwise, recovery will start from scratch by replaying all stored events.

    If recovery starts from a snapshot, the PersistentActor is offered that snapshot with a SnapshotOffer message, followed by replayed messages, if any, that are younger than the snapshot, up to the specified upper sequence number bound (ToSequenceNr).

    Inheritance
    object
    Recovery
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Persistence
    Assembly: Akka.Persistence.dll
    Syntax
    [Serializable]
    public sealed class Recovery

    Constructors

    | Edit this page View Source

    Recovery()

    Initializes a new instance of the Recovery class.

    Declaration
    public Recovery()
    | Edit this page View Source

    Recovery(SnapshotSelectionCriteria)

    Initializes a new instance of the Recovery class.

    Declaration
    public Recovery(SnapshotSelectionCriteria fromSnapshot)
    Parameters
    Type Name Description
    SnapshotSelectionCriteria fromSnapshot

    Criteria for selecting a saved snapshot from which recovery should start. Default is latest(= youngest) snapshot.

    | Edit this page View Source

    Recovery(SnapshotSelectionCriteria, long)

    Initializes a new instance of the Recovery class.

    Declaration
    public Recovery(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr)
    Parameters
    Type Name Description
    SnapshotSelectionCriteria fromSnapshot

    Criteria for selecting a saved snapshot from which recovery should start. Default is latest(= youngest) snapshot.

    long toSequenceNr

    Upper, inclusive sequence number bound for recovery. Default is no upper bound.

    | Edit this page View Source

    Recovery(SnapshotSelectionCriteria, long, long)

    Initializes a new instance of the Recovery class.

    Declaration
    public Recovery(SnapshotSelectionCriteria fromSnapshot = null, long toSequenceNr = 9223372036854775807, long replayMax = 9223372036854775807)
    Parameters
    Type Name Description
    SnapshotSelectionCriteria fromSnapshot

    Criteria for selecting a saved snapshot from which recovery should start. Default is latest(= youngest) snapshot.

    long toSequenceNr

    Upper, inclusive sequence number bound for recovery. Default is no upper bound.

    long replayMax

    Maximum number of messages to replay. Default is no limit.

    Properties

    | Edit this page View Source

    Default

    TBD

    Declaration
    public static Recovery Default { get; }
    Property Value
    Type Description
    Recovery
    | Edit this page View Source

    FromSnapshot

    Criteria for selecting a saved snapshot from which recovery should start. Default is latest (= youngest) snapshot.

    Declaration
    public SnapshotSelectionCriteria FromSnapshot { get; }
    Property Value
    Type Description
    SnapshotSelectionCriteria
    | Edit this page View Source

    None

    Convenience method for skipping recovery in PersistentActor.

    It will still retrieve previously highest sequence number so that new events are persisted with higher sequence numbers rather than starting from 1 and assuming that there are no previous event with that sequence number.

    Declaration
    public static Recovery None { get; }
    Property Value
    Type Description
    Recovery
    | Edit this page View Source

    ReplayMax

    Maximum number of messages to replay. Default is no limit.

    Declaration
    public long ReplayMax { get; }
    Property Value
    Type Description
    long
    | Edit this page View Source

    ToSequenceNr

    Upper, inclusive sequence number bound for recovery. Default is no upper bound.

    Declaration
    public long ToSequenceNr { get; }
    Property Value
    Type Description
    long

    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