Class PersistentFSMMigration

java.lang.Object
org.apache.pekko.persistence.typed.scaladsl.PersistentFSMMigration

public class PersistentFSMMigration extends Object
Helper functions for migration from PersistentFSM to Persistence Typed
  • 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 a EventSourcedBehavior
      Parameters:
      adapt - Takes in the state identifier, snapshot persisted by the PersistentFSM and the state timeout and returns the State that should be given to the the EventSourcedBehavior
      Returns:
      A SnapshotAdapter to be used with a EventSourcedBehavior