Package io.vertx.kafka.client.consumer
Class OffsetAndMetadata
- java.lang.Object
-
- io.vertx.kafka.client.consumer.OffsetAndMetadata
-
public class OffsetAndMetadata extends Object
Provide additional metadata when an offset is committed
-
-
Constructor Summary
Constructors Constructor Description OffsetAndMetadata()ConstructorOffsetAndMetadata(long offset, String metadata)ConstructorOffsetAndMetadata(JsonObject json)Constructor (from JSON representation)OffsetAndMetadata(OffsetAndMetadata that)Constructor (copy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMetadata()longgetOffset()OffsetAndMetadatasetMetadata(String metadata)Set additional metadata for the offset committedOffsetAndMetadatasetOffset(long offset)Set the offset to commitJsonObjecttoJson()Convert object to JSON representationStringtoString()
-
-
-
Constructor Detail
-
OffsetAndMetadata
public OffsetAndMetadata()
Constructor
-
OffsetAndMetadata
public OffsetAndMetadata(long offset, String metadata)Constructor- Parameters:
offset- offset to commitmetadata- additional metadata with the offset committed
-
OffsetAndMetadata
public OffsetAndMetadata(JsonObject json)
Constructor (from JSON representation)- Parameters:
json- JSON representation
-
OffsetAndMetadata
public OffsetAndMetadata(OffsetAndMetadata that)
Constructor (copy)- Parameters:
that- object to copy
-
-
Method Detail
-
getOffset
public long getOffset()
- Returns:
- offset to commit
-
setOffset
public OffsetAndMetadata setOffset(long offset)
Set the offset to commit- Parameters:
offset- offset to commit- Returns:
- current instance of the class to be fluent
-
getMetadata
public String getMetadata()
- Returns:
- additional metadata with the offset committed
-
setMetadata
public OffsetAndMetadata setMetadata(String metadata)
Set additional metadata for the offset committed- Parameters:
metadata- additional metadata- Returns:
- current instance of the class to be fluent
-
toJson
public JsonObject toJson()
Convert object to JSON representation- Returns:
- JSON representation
-
-