StreamProgress — Collection of Offsets per Streaming Source

StreamProgress is a collection of Offsets per streaming source.

StreamProgress is created when:

StreamProgress is an extension of Scala’s scala.collection.immutable.Map with streaming sources as keys and their Offsets as values.

Creating StreamProgress Instance

StreamProgress takes the following to be created:

Looking Up Offset by Streaming Source — get Method

get(key: BaseStreamingSource): Option[Offset]
Note
get is part of the Scala’s scala.collection.MapLike to…​FIXME.

get simply looks up an Offsets for the given BaseStreamingSource in the baseMap.

++ Method

++(
  updates: GenTraversableOnce[(BaseStreamingSource, Offset)]): StreamProgress

++ simply creates a new StreamProgress with the baseMap and the given updates.

Note
++ is used exclusively when OffsetSeq is requested to convert to StreamProgress.

Converting to OffsetSeq — toOffsetSeq Method

toOffsetSeq(
  sources: Seq[BaseStreamingSource],
  metadata: OffsetSeqMetadata): OffsetSeq

toOffsetSeq creates a OffsetSeq with offsets that are looked up for every BaseStreamingSource.

Note

toOffsetSeq is used when:

results matching ""

    No results matching ""