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

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

    Modifier and Type
    Method
    Description
    default STATE
    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 Details

    • 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