CommittableOffsetBatch

Companion:
class
class Object
trait Matchable
class Any

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. This can be used together with updated to create a batch from some 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.

See also:
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. Guaranteed to be equivalent to the following, but implemented more efficiently.

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.

See also:
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. Guaranteed to be equivalent to the following, but implemented more efficiently.

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.

See also:
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. Guaranteed to be equivalent to the following, but implemented more efficiently.

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.

See also:

Implicits

Implicits