Class OffsetAndTimestamp
java.lang.Object
org.apache.kafka.clients.consumer.OffsetAndTimestamp
A container class for offset and timestamp.
Constructor Summary
ConstructorsConstructorDescriptionOffsetAndTimestamp(long offset, long timestamp) OffsetAndTimestamp(long offset, long timestamp, Optional<Integer> leaderEpoch) Method Summary
Constructor Details
OffsetAndTimestamp
public OffsetAndTimestamp(long offset, long timestamp) OffsetAndTimestamp
Method Details
timestamp
public long timestamp()offset
public long offset()leaderEpoch
Get the leader epoch corresponding to the offset that was found (if one exists). This can be provided to seek() to ensure that the log hasn't been truncated prior to fetching.- Returns:
- The leader epoch or empty if it is not known
toString
equals
hashCode
public int hashCode()