Retrieve a snapshot before the given sequence number.
Retrieve a snapshot before the given sequence number. We typically specify a sequence number if we want to get some old snapshot i.e. the latest persisted snapshot may have been generated after the point in time that we're interested in.
The key
What sequence we want to get the snapshot for (earliest snapshot, latest, or latest before some sequence)
The snapshot, a NoSnapshot if there was no snapshot for the given conditions.
Save a given snapshot
Save a given snapshot
The key
The snapshot to save
Defines whether the given snapshot should be deemed the earliest point in the event stream (Epoch) or not (Cache)
Either a Throwable (for error) or the saved snapshot.
Implementations of this interface deal with persisting snapshots so that they don't need to be recomputed every time. Specifically, implementations do NOT deal with generating snapshots, only storing/retrieving any persisted snapshot.
Container around operations on an underlying data store e.g. Task.
The type of the key for snapshots. This does not need to be the same as for the event stream itself.
The type of the value wrapped by Snapshots that this store persists.