Class PersistentFSMMigration$


  • public class PersistentFSMMigration$
    extends java.lang.Object
    Helper functions for migration from PersistentFSM to Persistence Typed
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static PersistentFSMMigration$ MODULE$
      Static reference to the singleton instance of this Scala object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <State> SnapshotAdapter<State> snapshotAdapter​(Function3<java.lang.String,​java.lang.Object,​java.util.Optional<java.time.Duration>,​State> adapt)
      Create a snapshot adapter that will adapt snapshots created by a PersistentFSM into the correct State type of a EventSourcedBehavior
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MODULE$

        public static final PersistentFSMMigration$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • PersistentFSMMigration$

        public PersistentFSMMigration$()
    • Method Detail

      • snapshotAdapter

        public <State> SnapshotAdapter<State> snapshotAdapter​(Function3<java.lang.String,​java.lang.Object,​java.util.Optional<java.time.Duration>,​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