Interface InitialUpdate<StateT extends Revisioned>

  • Type Parameters:
    StateT - A revisioned object that updates to are coordinated with a StateSynchronizer.
    All Superinterfaces:

    public interface InitialUpdate<StateT extends Revisioned>
    extends Update<StateT>
    A constructor for a StateT object.
    • Method Detail

      • create

        StateT create​(java.lang.String scopedStreamName,
                      Revision revision)
        Returns an object of type StateT with the provided revision.
        scopedStreamName - The name of the stream that this state is associated with.
        revision - The revision to use
        A revisioned state object
      • applyTo

        default StateT applyTo​(StateT oldState,
                               Revision newRevision)
        Description copied from interface: Update
        Return an object of type StateT that is the same as oldState with this update applied to it. Invoking Revisioned.getRevision() on the result should return newRevision.
        Specified by:
        applyTo in interface Update<StateT extends Revisioned>
        oldState - The state to which should be used as the basis for the new state.
        newRevision - The revision for the new state.
        A state that represents a state with this update applied to it. (If StateT is mutable and the update is done in-place this is the same object as oldState)