Interface InitialStateProvider<STATE>

  • Type Parameters:
    STATE - The type of aggregate/projection/view STATE provided
    All Known Subinterfaces:
    Decider<COMMAND,​EVENT,​ERROR,​STATE>, View<EVENT,​STATE>

    public interface InitialStateProvider<STATE>
    Decider or View related interface, which provides the Initial STATE for a given aggregate/projection/view.
    The InitialStateProvider works in collaboration with the StateEvolver in the context of the Decider or View pattern
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default STATE initialState()
      The initial aggregate/projection/view STATE before any EVENT's have been applied / projected onto the aggregate/projection/view STATE
      Note: The default implementation returns a null aggregate/projection/view STATE
    • Method Detail

      • initialState

        default STATE initialState()
        The initial aggregate/projection/view STATE before any EVENT's have been applied / projected onto the aggregate/projection/view STATE
        Note: The default implementation returns a null aggregate/projection/view STATE
        Returns:
        the initial projection/view STATE. May be null