Search Results for

    Show / Hide Table of Contents

    Class JournalWriteBehavior

    Built-in Journal interceptors who will alter message Write of TestJournal.

    Inheritance
    object
    JournalRecoveryBehavior
    JournalWriteBehavior
    Inherited Members
    JournalRecoveryBehavior.SetInterceptorAsync(IJournalInterceptor)
    JournalRecoveryBehavior.Pass()
    JournalRecoveryBehavior.PassWithDelay(TimeSpan)
    JournalRecoveryBehavior.Fail()
    JournalRecoveryBehavior.FailOnType<TMessage>()
    JournalRecoveryBehavior.FailOnType(Type)
    JournalRecoveryBehavior.FailIf(Func<IPersistentRepresentation, bool>)
    JournalRecoveryBehavior.FailIf(Func<IPersistentRepresentation, Task<bool>>)
    JournalRecoveryBehavior.FailUnless(Func<IPersistentRepresentation, bool>)
    JournalRecoveryBehavior.FailUnless(Func<IPersistentRepresentation, Task<bool>>)
    JournalRecoveryBehavior.FailWithDelay(TimeSpan)
    JournalRecoveryBehavior.FailIfWithDelay(TimeSpan, Func<IPersistentRepresentation, Task<bool>>)
    JournalRecoveryBehavior.FailIfWithDelay(TimeSpan, Func<IPersistentRepresentation, bool>)
    JournalRecoveryBehavior.FailUnlessWithDelay(TimeSpan, Func<IPersistentRepresentation, bool>)
    JournalRecoveryBehavior.FailUnlessWithDelay(TimeSpan, Func<IPersistentRepresentation, Task<bool>>)
    JournalRecoveryBehavior.FailOnTypeWithDelay<TMessage>(TimeSpan)
    JournalRecoveryBehavior.FailOnTypeWithDelay(TimeSpan, Type)
    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 JournalWriteBehavior : JournalRecoveryBehavior

    Methods

    | Edit this page View Source

    Reject()

    Always reject all messages.

    Declaration
    public Task Reject()
    Returns
    Type Description
    Task
    Remarks

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    | Edit this page View Source

    RejectIf(Func<IPersistentRepresentation, bool>)

    Reject message if predicate predicate will return true.

    Declaration
    public Task RejectIf(Func<IPersistentRepresentation, bool> predicate)
    Parameters
    Type Name Description
    Func<IPersistentRepresentation, bool> predicate
    Returns
    Type Description
    Task
    Remarks

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    Exceptions
    Type Condition
    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    RejectIf(Func<IPersistentRepresentation, Task<bool>>)

    Reject message if async predicate predicate will return true.

    Declaration
    public Task RejectIf(Func<IPersistentRepresentation, Task<bool>> predicate)
    Parameters
    Type Name Description
    Func<IPersistentRepresentation, Task<bool>> predicate
    Returns
    Type Description
    Task
    Remarks

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    Exceptions
    Type Condition
    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    RejectIfWithDelay(TimeSpan, Func<IPersistentRepresentation, bool>)

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

    Declaration
    public Task RejectIfWithDelay(TimeSpan delay, Func<IPersistentRepresentation, bool> predicate)
    Parameters
    Type Name Description
    TimeSpan delay
    Func<IPersistentRepresentation, bool> predicate
    Returns
    Type Description
    Task
    Remarks

    Each message will be delayed individually.

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    RejectIfWithDelay(TimeSpan, Func<IPersistentRepresentation, Task<bool>>)

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

    Declaration
    public Task RejectIfWithDelay(TimeSpan delay, Func<IPersistentRepresentation, Task<bool>> predicate)
    Parameters
    Type Name Description
    TimeSpan delay
    Func<IPersistentRepresentation, Task<bool>> predicate
    Returns
    Type Description
    Task
    Remarks

    Each message will be delayed individually.

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    RejectOnType(Type)

    Reject message during processing message of type messageType.

    Declaration
    public Task RejectOnType(Type messageType)
    Parameters
    Type Name Description
    Type messageType
    Returns
    Type Description
    Task
    Remarks

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected> will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    • If messageType is interface, journal will reject when message implements that interface.
    • If messageType is class, journal will reject when message can be assigned to messageType.
    Exceptions
    Type Condition
    ArgumentNullException

    When messageType is null.

    | Edit this page View Source

    RejectOnTypeWithDelay(TimeSpan, Type)

    Reject message after specified delay if recovering message of type messageType.

    Declaration
    public Task RejectOnTypeWithDelay(TimeSpan delay, Type messageType)
    Parameters
    Type Name Description
    TimeSpan delay
    Type messageType
    Returns
    Type Description
    Task
    Remarks

    Each message will be delayed individually.

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    • If messageType is interface, journal will reject when message implements that interface.
    • If messageType is class, journal will reject when message can be assigned to messageType.
    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    ArgumentNullException

    When messageType is null.

    | Edit this page View Source

    RejectOnTypeWithDelay<TMessage>(TimeSpan)

    Reject message after specified delay if recovering message of type TMessage.

    Declaration
    public Task RejectOnTypeWithDelay<TMessage>(TimeSpan delay)
    Parameters
    Type Name Description
    TimeSpan delay
    Returns
    Type Description
    Task
    Type Parameters
    Name Description
    TMessage
    Remarks

    Each message will be delayed individually.

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    • If TMessage is interface, journal will reject when message implements that interface.
    • If TMessage is class, journal will reject when message can be assigned to TMessage.
    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    | Edit this page View Source

    RejectOnType<TMessage>()

    Reject message during processing message of type TMessage.

    Declaration
    public Task RejectOnType<TMessage>()
    Returns
    Type Description
    Task
    Type Parameters
    Name Description
    TMessage
    Remarks

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    • If TMessage is interface, journal will reject when message implements that interface.
    • If TMessage is class, journal will reject when message can be assigned to TMessage.
    | Edit this page View Source

    RejectUnless(Func<IPersistentRepresentation, bool>)

    Reject message unless predicate predicate will return true.

    Declaration
    public Task RejectUnless(Func<IPersistentRepresentation, bool> predicate)
    Parameters
    Type Name Description
    Func<IPersistentRepresentation, bool> predicate
    Returns
    Type Description
    Task
    Remarks

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    Exceptions
    Type Condition
    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    RejectUnless(Func<IPersistentRepresentation, Task<bool>>)

    Reject message unless async predicate predicate will return true.

    Declaration
    public Task RejectUnless(Func<IPersistentRepresentation, Task<bool>> predicate)
    Parameters
    Type Name Description
    Func<IPersistentRepresentation, Task<bool>> predicate
    Returns
    Type Description
    Task
    Remarks

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    Exceptions
    Type Condition
    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    RejectUnlessWithDelay(TimeSpan, Func<IPersistentRepresentation, bool>)

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

    Declaration
    public Task RejectUnlessWithDelay(TimeSpan delay, Func<IPersistentRepresentation, bool> predicate)
    Parameters
    Type Name Description
    TimeSpan delay
    Func<IPersistentRepresentation, bool> predicate
    Returns
    Type Description
    Task
    Remarks

    Each message will be delayed individually.

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    RejectUnlessWithDelay(TimeSpan, Func<IPersistentRepresentation, Task<bool>>)

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

    Declaration
    public Task RejectUnlessWithDelay(TimeSpan delay, Func<IPersistentRepresentation, Task<bool>> predicate)
    Parameters
    Type Name Description
    TimeSpan delay
    Func<IPersistentRepresentation, Task<bool>> predicate
    Returns
    Type Description
    Task
    Remarks

    Each message will be delayed individually.

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    ArgumentNullException

    When predicate is null.

    | Edit this page View Source

    RejectWithDelay(TimeSpan)

    Reject message after specified delay.

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

    Each message will be delayed individually.

    Journal will **NOT** crash, but UntypedPersistentActor.OnPersistRejected will be called on each rejected message.

    Use this Journal behavior when it is needed to verify how well a persistent actor will handle serialization, type conversion and other local problems withing journal.

    Exceptions
    Type Condition
    ArgumentException

    When delay is less or equal to Zero.

    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