Interface SnapshotAdapter<State>

Type Parameters:
State - The state type of the EventSourcedBehavior

public interface SnapshotAdapter<State>
Facility to convert snapshots from and to a specialized data model. Can be used when migration from different state types e.g. when migration from Persistent FSM to Typed EventSourcedBehavior.

  • Method Summary

    Modifier and Type
    Method
    Description
    Transform the stored state into the current state type.
    Transform the state to a different type before sending to the journal.
  • Method Details

    • fromJournal

      State fromJournal(Object from)
      Transform the stored state into the current state type. Can be used for migrations from different serialized state types.
    • toJournal

      Object toJournal(State state)
      Transform the state to a different type before sending to the journal.