Interface EventsBySliceStartingFromSnapshotsQuery

All Superinterfaces:
ReadJournal
All Known Implementing Classes:
EventsBySliceFirehoseQuery

public interface EventsBySliceStartingFromSnapshotsQuery extends ReadJournal
A plugin may optionally support this query by implementing this trait.

EventsBySliceQuery that is using a timestamp based offset should also implement EventTimestampQuery and LoadEventQuery.

See also EventsBySliceFirehoseQuery.

API May Change

  • Method Details

    • eventsBySlicesStartingFromSnapshots

      <Snapshot, Event> Source<EventEnvelope<Event>,NotUsed> eventsBySlicesStartingFromSnapshots(String entityType, int minSlice, int maxSlice, Offset offset, Function<Snapshot,Event> transformSnapshot)
      Same as EventsBySliceQuery but with the purpose to use snapshots as starting points and thereby reducing number of events that have to be loaded. This can be useful if the consumer start from zero without any previously processed offset or if it has been disconnected for a long while and its offset is far behind.
    • sliceForPersistenceId

      int sliceForPersistenceId(String persistenceId)
    • sliceRanges

      List<Pair<Integer,Integer>> sliceRanges(int numberOfRanges)