Interface Update<StateT extends Revisioned>

  • Type Parameters:
    StateT - The type of the object being updated
    All Known Subinterfaces:
    InitialUpdate<StateT>

    public interface Update<StateT extends Revisioned>
    An update to a StateT object coordinated via a StateSynchronizer.
    • Method Detail

      • applyTo

        StateT applyTo​(StateT oldState,
                       Revision newRevision)
        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.
        Parameters:
        oldState - The state to which should be used as the basis for the new state.
        newRevision - The revision for the new state.
        Returns:
        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)