Class OffsetAndTimestamp
java.lang.Object
org.apache.kafka.clients.consumer.OffsetAndTimestamp
-
Constructor Summary
ConstructorsConstructorDescriptionOffsetAndTimestamp(long offset, long timestamp) Constructs a new OffsetAndTimestamp with the given offset and timestamp.OffsetAndTimestamp(long offset, long timestamp, Optional<Integer> leaderEpoch) Constructs a new OffsetAndTimestamp with the given offset, timestamp, and leader epoch. -
Method Summary
-
Constructor Details
-
OffsetAndTimestamp
public OffsetAndTimestamp(long offset, long timestamp) Constructs a new OffsetAndTimestamp with the given offset and timestamp.- Parameters:
offset- The offsettimestamp- The timestamp- Throws:
IllegalArgumentException- If the offset or timestamp is negative
-
OffsetAndTimestamp
Constructs a new OffsetAndTimestamp with the given offset, timestamp, and leader epoch.- Parameters:
offset- The offsettimestamp- The timestampleaderEpoch- The leader epoch- Throws:
IllegalArgumentException- If the offset or timestamp is negative
-
-
Method Details
-
timestamp
public long timestamp()Returns the timestamp.- Returns:
- The timestamp
-
offset
public long offset()Returns the offset.- Returns:
- The offset
-
leaderEpoch
-
toString
-
equals
-
hashCode
-