public interface ProjectionService
Provides functionality related to projections.
-
Method Summary
Modifier and TypeMethodDescription@NotNull LongreadProjectionPosition(@NotNull org.fuin.esc.api.StreamId streamId) Reads the position that was read last time.voidresetProjectionPosition(@NotNull org.fuin.esc.api.StreamId streamId) Sets the stored position of the projection to the start position.voidupdateProjectionPosition(@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
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.
-