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.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.lang.String |
metadata() |
long |
offset() |
java.lang.String |
toString() |
public 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 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