Class PersistenceProbeBehavior$
- java.lang.Object
-
- org.apache.pekko.persistence.testkit.javadsl.PersistenceProbeBehavior$
-
public class PersistenceProbeBehavior$ extends java.lang.ObjectFactory methods to create PersistenceProbeBehavior instances for testing.- Since:
- 1.3.0
-
-
Field Summary
Fields Modifier and Type Field Description static PersistenceProbeBehavior$MODULE$Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description PersistenceProbeBehavior$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <Command,State>
PersistenceProbeBehavior<Command,java.lang.Void,State>fromDurableState(Behavior<Command> behavior)<Command,State>
PersistenceProbeBehavior<Command,java.lang.Void,State>fromDurableState(Behavior<Command> behavior, State initialState)<Command,Event,State>
PersistenceProbeBehavior<Command,Event,State>fromEventSourced(Behavior<Command> behavior)<Command,Event,State>
PersistenceProbeBehavior<Command,Event,State>fromEventSourced(Behavior<Command> behavior, State initialState, long initialSequenceNr)Given an EventSourcedBehavior, produce a non-persistent Behavior which synchronously publishes events and snapshots for inspection.
-
-
-
Field Detail
-
MODULE$
public static final PersistenceProbeBehavior$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
fromEventSourced
public <Command,Event,State> PersistenceProbeBehavior<Command,Event,State> fromEventSourced(Behavior<Command> behavior, State initialState, long initialSequenceNr)
Given an EventSourcedBehavior, produce a non-persistent Behavior which synchronously publishes events and snapshots for inspection. State is updated as in the EventSourcedBehavior, and side effects are performed synchronously. The resulting Behavior is, contingent on the command handling, event handling, and side effects being compatible with the BehaviorTestKit, testable with the BehaviorTestKit.The returned Behavior does not intrinsically depend on configuration: it therefore does not serialize and assumes an unbounded stash for commands.
- Parameters:
behavior- a (possibly wrapped) EventSourcedBehavior to serve as the basis for the persistenceProbe behaviorinitialState- start the persistenceProbe behavior with this state; if null, behavior's initialState will be usedinitialSequenceNr- start the persistenceProbe behavior with this sequence number; only applies if initialState is non-null- Returns:
- an PersistenceProbeBehavior based on an EventSourcedBehavior
-
fromEventSourced
public <Command,Event,State> PersistenceProbeBehavior<Command,Event,State> fromEventSourced(Behavior<Command> behavior)
-
fromDurableState
public <Command,State> PersistenceProbeBehavior<Command,java.lang.Void,State> fromDurableState(Behavior<Command> behavior, State initialState)
-
fromDurableState
public <Command,State> PersistenceProbeBehavior<Command,java.lang.Void,State> fromDurableState(Behavior<Command> behavior)
-
-