Search Results for

    Show / Hide Table of Contents

    Class SnapshotStoreSaveBehavior

    Built-in snapshot store interceptors who will alter message Write of TestSnapshotStore.

    Inheritance
    object
    SnapshotStoreSaveBehavior
    SnapshotStoreDeleteBehavior
    SnapshotStoreLoadBehavior
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Persistence.TestKit
    Assembly: Akka.Persistence.TestKit.dll
    Syntax
    public class SnapshotStoreSaveBehavior

    Constructors

    | Edit this page View Source

    SnapshotStoreSaveBehavior(ISnapshotStoreBehaviorSetter)

    Declaration
    public SnapshotStoreSaveBehavior(ISnapshotStoreBehaviorSetter setter)
    Parameters
    Type Name Description
    ISnapshotStoreBehaviorSetter setter

    Fields

    | Edit this page View Source

    Setter

    Declaration
    protected readonly ISnapshotStoreBehaviorSetter Setter
    Field Value
    Type Description
    ISnapshotStoreBehaviorSetter

    Methods

    | Edit this page View Source

    Fail()

    Always fail all messages.

    Declaration
    public Task Fail()
    Returns
    Type Description
    Task
    Remarks

    Snapshot store will crash and actor will receive one of SaveSnapshotFailure, DeleteSnapshotFailure or DeleteSnapshotsFailure messages.

    Use this snapshot store behavior when it is needed to verify how well a persistent actor will handle network problems and similar issues with underlying snapshot store.

    | Edit this page View Source

    FailIf(Func<string, SnapshotSelectionCriteria, bool>)

    Fail message if predicate predicate will return true.

    Declaration
    public Task FailIf(Func<string, SnapshotSelectionCriteria, bool> predicate)
    Parameters
    Type Name Description
    Func<string, SnapshotSelectionCriteria, bool> predicate
    Returns
    Type Description
    Task
    Remarks

    Snapshot store will crash and actor will receive one of SaveSnapshotFailure, DeleteSnapshotFailure or DeleteSnapshotsFailure messages.

    Use this snapshot store behavior when it is needed to verify how well a persistent actor will handle network problems and similar issues with underlying snapshot store.

    Exceptions
    Type Condition
    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    FailIf(Func<string, SnapshotSelectionCriteria, Task<bool>>)

    Fail message if async predicate predicate will return true.

    Declaration
    public Task FailIf(Func<string, SnapshotSelectionCriteria, Task<bool>> predicate)
    Parameters
    Type Name Description
    Func<string, SnapshotSelectionCriteria, Task<bool>> predicate
    Returns
    Type Description
    Task
    Remarks

    Snapshot store will crash and actor will receive one of SaveSnapshotFailure, DeleteSnapshotFailure or DeleteSnapshotsFailure messages.

    Use this snapshot store behavior when it is needed to verify how well a persistent actor will handle network problems and similar issues with underlying snapshot store.

    Exceptions
    Type Condition
    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    FailIfWithDelay(TimeSpan, Func<string, SnapshotSelectionCriteria, bool>)

    Fail message after specified delay if predicate predicate will return true.

    Declaration
    public Task FailIfWithDelay(TimeSpan delay, Func<string, SnapshotSelectionCriteria, bool> predicate)
    Parameters
    Type Name Description
    TimeSpan delay
    Func<string, SnapshotSelectionCriteria, bool> predicate
    Returns
    Type Description
    Task
    Remarks

    Snapshot store will crash and actor will receive one of SaveSnapshotFailure, DeleteSnapshotFailure or DeleteSnapshotsFailure messages.

    Use this snapshot store behavior when it is needed to verify how well a persistent actor will handle network problems

    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    FailIfWithDelay(TimeSpan, Func<string, SnapshotSelectionCriteria, Task<bool>>)

    Fail message after specified delay if async predicate predicate will return true.

    Declaration
    public Task FailIfWithDelay(TimeSpan delay, Func<string, SnapshotSelectionCriteria, Task<bool>> predicate)
    Parameters
    Type Name Description
    TimeSpan delay
    Func<string, SnapshotSelectionCriteria, Task<bool>> predicate
    Returns
    Type Description
    Task
    Remarks

    Snapshot store will crash and actor will receive one of SaveSnapshotFailure, DeleteSnapshotFailure or DeleteSnapshotsFailure messages.

    Use this snapshot store behavior when it is needed to verify how well a persistent actor will handle network problems

    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    FailUnless(Func<string, SnapshotSelectionCriteria, bool>)

    Fail message unless predicate predicate will return true.

    Declaration
    public Task FailUnless(Func<string, SnapshotSelectionCriteria, bool> predicate)
    Parameters
    Type Name Description
    Func<string, SnapshotSelectionCriteria, bool> predicate
    Returns
    Type Description
    Task
    Remarks

    Snapshot store will crash and actor will receive one of SaveSnapshotFailure, DeleteSnapshotFailure or DeleteSnapshotsFailure messages.

    Use this snapshot store behavior when it is needed to verify how well a persistent actor will handle network problems and similar issues with underlying snapshot store.

    Exceptions
    Type Condition
    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    FailUnless(Func<string, SnapshotSelectionCriteria, Task<bool>>)

    Fail message unless async predicate predicate will return true.

    Declaration
    public Task FailUnless(Func<string, SnapshotSelectionCriteria, Task<bool>> predicate)
    Parameters
    Type Name Description
    Func<string, SnapshotSelectionCriteria, Task<bool>> predicate
    Returns
    Type Description
    Task
    Remarks

    Snapshot store will crash and actor will receive one of SaveSnapshotFailure, DeleteSnapshotFailure or DeleteSnapshotsFailure messages.

    Use this snapshot store behavior when it is needed to verify how well a persistent actor will handle network problems and similar issues with underlying snapshot store.

    Exceptions
    Type Condition
    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    FailUnlessWithDelay(TimeSpan, Func<string, SnapshotSelectionCriteria, bool>)

    Fail message after specified delay unless predicate predicate will return true.

    Declaration
    public Task FailUnlessWithDelay(TimeSpan delay, Func<string, SnapshotSelectionCriteria, bool> predicate)
    Parameters
    Type Name Description
    TimeSpan delay
    Func<string, SnapshotSelectionCriteria, bool> predicate
    Returns
    Type Description
    Task
    Remarks

    Snapshot store will crash and actor will receive one of SaveSnapshotFailure, DeleteSnapshotFailure or DeleteSnapshotsFailure messages.

    Use this snapshot store behavior when it is needed to verify how well a persistent actor will handle network problems

    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    FailUnlessWithDelay(TimeSpan, Func<string, SnapshotSelectionCriteria, Task<bool>>)

    Fail message after specified delay unless async predicate predicate will return true.

    Declaration
    public Task FailUnlessWithDelay(TimeSpan delay, Func<string, SnapshotSelectionCriteria, Task<bool>> predicate)
    Parameters
    Type Name Description
    TimeSpan delay
    Func<string, SnapshotSelectionCriteria, Task<bool>> predicate
    Returns
    Type Description
    Task
    Remarks

    Snapshot store will crash and actor will receive one of SaveSnapshotFailure, DeleteSnapshotFailure or DeleteSnapshotsFailure messages.

    Use this snapshot store behavior when it is needed to verify how well a persistent actor will handle network problems

    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    FailWithDelay(TimeSpan)

    Fail message after specified delay.

    Declaration
    public Task FailWithDelay(TimeSpan delay)
    Parameters
    Type Name Description
    TimeSpan delay
    Returns
    Type Description
    Task
    Remarks

    Snapshot store will crash and actor will receive one of SaveSnapshotFailure, DeleteSnapshotFailure or DeleteSnapshotsFailure messages.

    Use this snapshot store behavior when it is needed to verify how well a persistent actor will handle network problems

    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    | Edit this page View Source

    Pass()

    Pass all messages to snapshot store without interfering.

    Declaration
    public Task Pass()
    Returns
    Type Description
    Task
    Remarks

    By using this interceptor TestSnapshotStore all snapshot store operations will work like in standard MemorySnapshotStore.

    | Edit this page View Source

    PassWithDelay(TimeSpan)

    Delay passing all messages to snapshot store by delay.

    Declaration
    public Task PassWithDelay(TimeSpan delay)
    Parameters
    Type Name Description
    TimeSpan delay

    Time by which recovery operation will be delayed.

    Returns
    Type Description
    Task
    Remarks

    Each message will be delayed individually.

    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    | Edit this page View Source

    SetInterceptorAsync(ISnapshotStoreInterceptor)

    Use custom, user defined interceptor.

    Declaration
    public Task SetInterceptorAsync(ISnapshotStoreInterceptor interceptor)
    Parameters
    Type Name Description
    ISnapshotStoreInterceptor interceptor

    User defined interceptor which implements ISnapshotStoreInterceptor interface.

    Returns
    Type Description
    Task
    Exceptions
    Type Condition
    ArgumentNullException

    When interceptor is null.

    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