CommittableOffsetBatch

fs2.kafka.CommittableOffsetBatch
See theCommittableOffsetBatch companion class

Attributes

Companion
class
Source
CommittableOffsetBatch.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def empty[F[_]](implicit F: Applicative[F]): CommittableOffsetBatch[F]

An empty CommittableOffsetBatch which does not include any offsets and commit will not commit offsets.

An empty CommittableOffsetBatch which does not include any offsets and commit will not commit offsets. This can be used together with updated to create a batch from some offsets.

Attributes

See also
Source
CommittableOffsetBatch.scala
def fromFoldable[F[_], G[_]](offsets: G[CommittableOffset[F]])(implicit F: ApplicativeError[F, Throwable], G: Foldable[G]): CommittableOffsetBatch[F]

Creates a CommittableOffsetBatch from some CommittableOffsets, where the containing type has a Foldable instance.

Creates a CommittableOffsetBatch from some CommittableOffsets, where the containing type has a Foldable instance. Guaranteed to be equivalent to the following, but implemented more efficiently.

offsets.foldLeft(CommittableOffsetBatch.empty[F])(_ updated _)

Note that just like for updated, offsets have to be in order per topic-partition.

Attributes

See also
Source
CommittableOffsetBatch.scala
def fromFoldableMap[F[_], G[_], A](ga: G[A])(f: A => CommittableOffset[F])(implicit F: ApplicativeError[F, Throwable], G: Foldable[G]): CommittableOffsetBatch[F]

Creates a CommittableOffsetBatch from a Foldable containing As, by applying f to each A to get the CommittableOffset.

Creates a CommittableOffsetBatch from a Foldable containing As, by applying f to each A to get the CommittableOffset. Guaranteed to be equivalent to the following, but implemented more efficiently.

ga.foldLeft(CommittableOffsetBatch.empty[F])(_ updated f(_))

Note that just like for updated, offsets have to be in order per topic-partition.

Attributes

See also
Source
CommittableOffsetBatch.scala
def fromFoldableOption[F[_], G[_]](offsets: G[Option[CommittableOffset[F]]])(implicit F: ApplicativeError[F, Throwable], G: Foldable[G]): CommittableOffsetBatch[F]

Creates a CommittableOffsetBatch from some CommittableOffsets wrapped in Option, where the containing type has a Foldable instance.

Creates a CommittableOffsetBatch from some CommittableOffsets wrapped in Option, where the containing type has a Foldable instance. Guaranteed to be equivalent to the following, but implemented more efficiently.

offsets.foldLeft(CommittableOffsetBatch.empty[F]) {
 case (batch, Some(offset)) => batch.updated(offset)
 case (batch, None)         => batch
}

Note that just like for updated, offsets have to be in order per topic-partition.

Attributes

See also
Source
CommittableOffsetBatch.scala

Implicits

Implicits