Class SharePartitionOffsetInfo

java.lang.Object
org.apache.kafka.clients.admin.SharePartitionOffsetInfo

public class SharePartitionOffsetInfo extends Object
This class is used to contain the offset and lag information for a share-partition.
  • Constructor Details

    • SharePartitionOffsetInfo

      public SharePartitionOffsetInfo(long startOffset, Optional<Integer> leaderEpoch, Optional<Long> lag)
      Construct a new SharePartitionOffsetInfo.
      Parameters:
      startOffset - The share-partition start offset. The start offset is the earliest offset for in-flight records being evaluated for delivery to share consumers. Some records after the start offset may already have completed delivery.
      leaderEpoch - The optional leader epoch of the share-partition
      lag - The optional lag for the share-partition
  • Method Details

    • startOffset

      public long startOffset()
      Get the start offset for the share-partition. The start offset is the earliest offset for in-flight records being evaluated for delivery to share consumers. Some records after the start offset may already have completed delivery.
      Returns:
      The start offset of the partition read by the share group.
    • leaderEpoch

      public Optional<Integer> leaderEpoch()
      Get the leader epoch for the partition.
      Returns:
      The leader epoch of the partition.
    • lag

      public Optional<Long> lag()
      Get the lag for the partition.
      Returns:
      The lag of the partition.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object