Interface CurrentEventsBySliceStartingFromSnapshotsQuery

  • All Superinterfaces:

    public interface CurrentEventsBySliceStartingFromSnapshotsQuery
    extends ReadJournal
    A plugin may optionally support this query by implementing this trait.
    • Method Detail

      • currentEventsBySlicesStartingFromSnapshots

        <Snapshot,​Event> Source<EventEnvelope<Event>,​NotUsed> currentEventsBySlicesStartingFromSnapshots​(java.lang.String entityType,
                                                                                                                     int minSlice,
                                                                                                                     int maxSlice,
                                                                                                                     Offset offset,
                                                                                                                     scala.Function1<Snapshot,​Event> transformSnapshot)
        Same as EventsBySliceStartingFromSnapshotsQuery 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.

        Same type of query as EventsBySliceStartingFromSnapshotsQuery.eventsBySlicesStartingFromSnapshots but the event stream is completed immediately when it reaches the end of the "result set".

      • sliceForPersistenceId

        int sliceForPersistenceId​(java.lang.String persistenceId)
      • sliceRanges

        scala.collection.immutable.Seq<scala.collection.immutable.Range> sliceRanges​(int numberOfRanges)