Class PersistentFSMMigration
java.lang.Object
org.apache.pekko.persistence.typed.scaladsl.PersistentFSMMigration
Helper functions for migration from PersistentFSM to Persistence Typed
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <State> SnapshotAdapter<State>snapshotAdapter(scala.Function3<String, Object, scala.Option<scala.concurrent.duration.FiniteDuration>, State> adapt) Create a snapshot adapter that will adapt snapshots created by a PersistentFSM into the correct State type of aEventSourcedBehavior
-
Constructor Details
-
PersistentFSMMigration
public PersistentFSMMigration()
-
-
Method Details
-
snapshotAdapter
public static <State> SnapshotAdapter<State> snapshotAdapter(scala.Function3<String, Object, scala.Option<scala.concurrent.duration.FiniteDuration>, State> adapt) Create a snapshot adapter that will adapt snapshots created by a PersistentFSM into the correct State type of aEventSourcedBehavior- Parameters:
adapt- Takes in the state identifier, snapshot persisted by the PersistentFSM and the state timeout and returns theStatethat should be given to the theEventSourcedBehavior- Returns:
- A
SnapshotAdapterto be used with aEventSourcedBehavior
-