Class Offsets<P extends Partition,​O extends OffsetContext>


  • public final class Offsets<P extends Partition,​O extends OffsetContext>
    extends Object
    Keeps track the source partitions to be processed by the connector task and their respective offsets.
    • Constructor Detail

      • Offsets

        public Offsets​(Map<P,​O> offsets)
    • Method Detail

      • resetOffset

        public void resetOffset​(P partition)
      • getTheOnlyPartition

        public P getTheOnlyPartition()
        Returns the offset of the only partition that the task is configured to use. This method is meant to be used only by the connectors that do not implement handling multiple partitions per task.
      • getTheOnlyOffset

        public O getTheOnlyOffset()
        Returns the offset of the only offset that the task is configured to use. This method is meant to be used only by the connectors that do not implement handling multiple partitions per task.