public class OffsetAndMetadata extends Object implements Serializable
Constructor and Description |
---|
OffsetAndMetadata(long offset)
Construct a new OffsetAndMetadata object for committing through
KafkaConsumer . |
OffsetAndMetadata(long offset,
String metadata)
Construct a new OffsetAndMetadata object for committing through
KafkaConsumer . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
String |
metadata() |
long |
offset() |
String |
toString() |
public OffsetAndMetadata(long offset, 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 committed