Class PersistentFSMMigration
java.lang.Object
org.apache.pekko.persistence.typed.javadsl.PersistentFSMMigration
Helper functions for migration from PersistentFSM to Persistence Typed
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <State> SnapshotAdapter<State>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(Function3<String, Object, Optional<Duration>, 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
-