public class OffsetAndMetadata
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
OffsetAndMetadata(long offset)
Construct a new OffsetAndMetadata object for committing through
KafkaConsumer . |
OffsetAndMetadata(long offset,
java.util.Optional<java.lang.Integer> leaderEpoch,
java.lang.String metadata)
Construct a new OffsetAndMetadata object for committing through
KafkaConsumer . |
OffsetAndMetadata(long offset,
java.lang.String metadata)
Construct a new OffsetAndMetadata object for committing through
KafkaConsumer . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.util.Optional<java.lang.Integer> |
leaderEpoch()
Get the leader epoch of the previously consumed record (if one is known).
|
java.lang.String |
metadata() |
long |
offset() |
java.lang.String |
toString() |
public OffsetAndMetadata(long offset, java.util.Optional<java.lang.Integer> leaderEpoch, java.lang.String metadata)
KafkaConsumer
.offset
- The offset to be committedleaderEpoch
- Optional leader epoch of the last consumed recordmetadata
- Non-null metadatapublic OffsetAndMetadata(long offset, java.lang.String metadata)
KafkaConsumer
.offset
- The offset to be committedmetadata
- Non-null metadatapublic OffsetAndMetadata(long offset)
KafkaConsumer
. The metadata
associated with the commit will be empty.offset
- The offset to be committedpublic long offset()
public java.lang.String metadata()
public java.util.Optional<java.lang.Integer> leaderEpoch()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object