Interface ProjectionService


public interface ProjectionService
Provides functionality related to projections.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Long
    readProjectionPosition(@NotNull org.fuin.esc.api.StreamId streamId)
    Reads the position that was read last time.
    void
    resetProjectionPosition(@NotNull org.fuin.esc.api.StreamId streamId)
    Sets the stored position of the projection to the start position.
    void
    updateProjectionPosition(@NotNull org.fuin.esc.api.StreamId streamId, @NotNull Long nextEventNumber)
    Updates the position to read next time.
  • Method Details

    • resetProjectionPosition

      void resetProjectionPosition(@NotNull @NotNull org.fuin.esc.api.StreamId streamId)
      Sets the stored position of the projection to the start position.
      Parameters:
      streamId - Unique ID of the stream.
    • readProjectionPosition

      @NotNull @NotNull Long readProjectionPosition(@NotNull @NotNull org.fuin.esc.api.StreamId streamId)
      Reads the position that was read last time.
      Parameters:
      streamId - Unique ID of the stream.
      Returns:
      Number of the next event to read.
    • updateProjectionPosition

      void updateProjectionPosition(@NotNull @NotNull org.fuin.esc.api.StreamId streamId, @NotNull @NotNull Long nextEventNumber)
      Updates the position to read next time.
      Parameters:
      streamId - Unique ID of the stream.
      nextEventNumber - Number of the next event to read.