Class OffsetReader<P extends Partition,O extends OffsetContext,L extends OffsetContext.Loader<O>>

java.lang.Object
io.debezium.connector.common.OffsetReader<P,O,L>

public class OffsetReader<P extends Partition,O extends OffsetContext,L extends OffsetContext.Loader<O>> extends Object
Provides access to the partition offsets stored by connectors.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final L
     
    private final org.apache.kafka.connect.storage.OffsetStorageReader
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    OffsetReader(org.apache.kafka.connect.storage.OffsetStorageReader reader, L loader)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    offsets(Set<P> partitions)
    Given the collection of connector-specific task partitions, returns their respective connector-specific offsets.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • reader

      private final org.apache.kafka.connect.storage.OffsetStorageReader reader
    • loader

      private final L extends OffsetContext.Loader<O> loader
  • Constructor Details

    • OffsetReader

      public OffsetReader(org.apache.kafka.connect.storage.OffsetStorageReader reader, L loader)
  • Method Details

    • offsets

      public Map<P,O> offsets(Set<P> partitions)
      Given the collection of connector-specific task partitions, returns their respective connector-specific offsets. If there is no offset stored for a given partition, the corresponding key will be mapped to a null.