Package io.vertx.kafka.client.producer
Class RecordMetadata
- java.lang.Object
- 
- io.vertx.kafka.client.producer.RecordMetadata
 
- 
 public class RecordMetadata extends Object Metadata related to a Kafka record
- 
- 
Constructor SummaryConstructors Constructor Description RecordMetadata()ConstructorRecordMetadata(long offset, int partition, long timestamp, String topic)ConstructorRecordMetadata(JsonObject json)Constructor (from JSON representation)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetOffset()intgetPartition()longgetTimestamp()StringgetTopic()RecordMetadatasetOffset(long offset)Set the offset of the record in the topic/partition.RecordMetadatasetPartition(int partition)Set the partition the record was sent toRecordMetadatasetTimestamp(long timestamp)Set the timestamp of the record in the topic/partitionRecordMetadatasetTopic(String topic)Set the topic the record was appended toJsonObjecttoJson()Convert object to JSON representation
 
- 
- 
- 
Constructor Detail- 
RecordMetadatapublic RecordMetadata() Constructor
 - 
RecordMetadatapublic RecordMetadata(long offset, int partition, long timestamp, String topic)Constructor- Parameters:
- offset- the offset of the record in the topic/partition.
- partition- the partition the record was sent to
- timestamp- the timestamp of the record in the topic/partition
- topic- the topic the record was appended to
 
 - 
RecordMetadatapublic RecordMetadata(JsonObject json) Constructor (from JSON representation)- Parameters:
- json- JSON representation
 
 
- 
 - 
Method Detail- 
getOffsetpublic long getOffset() - Returns:
- the offset of the record in the topic/partition.
 
 - 
setOffsetpublic RecordMetadata setOffset(long offset) Set the offset of the record in the topic/partition.- Parameters:
- offset- offset of the record in the topic/partition
- Returns:
- current instance of the class to be fluent
 
 - 
getPartitionpublic int getPartition() - Returns:
- the partition the record was sent to
 
 - 
setPartitionpublic RecordMetadata setPartition(int partition) Set the partition the record was sent to- Parameters:
- partition- the partition the record was sent to
- Returns:
- current instance of the class to be fluent
 
 - 
getTimestamppublic long getTimestamp() - Returns:
- the timestamp of the record in the topic/partition
 
 - 
setTimestamppublic RecordMetadata setTimestamp(long timestamp) Set the timestamp of the record in the topic/partition- Parameters:
- timestamp- the timestamp of the record in the topic/partition
- Returns:
- current instance of the class to be fluent
 
 - 
getTopicpublic String getTopic() - Returns:
- the topic the record was appended to
 
 - 
setTopicpublic RecordMetadata setTopic(String topic) Set the topic the record was appended to- Parameters:
- topic- the topic the record was appended to
- Returns:
- current instance of the class to be fluent
 
 - 
toJsonpublic JsonObject toJson() Convert object to JSON representation- Returns:
- JSON representation
 
 
- 
 
-