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 Summary

    Constructors
    Constructor and Description
    `RecordMetadata()` Constructor
    `RecordMetadata(JsonObject json)` Constructor (from JSON representation)
    `RecordMetadata(long offset, int partition, long timestamp, String topic)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getOffset()`
    `int` | `getPartition()`
    `long` | `getTimestamp()`
    `String` | `getTopic()`
    `RecordMetadata` | `setOffset(long offset)` Set the offset of the record in the topic/partition.
    `RecordMetadata` | `setPartition(int partition)` Set the partition the record was sent to
    `RecordMetadata` | `setTimestamp(long timestamp)` Set the timestamp of the record in the topic/partition
    `RecordMetadata` | `setTopic(String topic)` Set the topic the record was appended to
    `JsonObject` | `toJson()` Convert object to JSON representation

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RecordMetadata

          public RecordMetadata()

      Constructor

    - #### RecordMetadata

          public 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

    - #### RecordMetadata

          public RecordMetadata(JsonObject json)

      Constructor (from JSON representation)
      Parameters:
        `json` - JSON representation

  - ### Method Detail

    - #### getOffset

          public long getOffset()

      Returns:
        the offset of the record in the topic/partition.

    - #### setOffset

          public 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

    - #### getPartition

          public int getPartition()

      Returns:
        the partition the record was sent to

    - #### setPartition

          public 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

    - #### getTimestamp

          public long getTimestamp()

      Returns:
        the timestamp of the record in the topic/partition

    - #### setTimestamp

          public 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

    - #### getTopic

          public String getTopic()

      Returns:
        the topic the record was appended to

    - #### setTopic

          public 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

    - #### toJson

          public JsonObject toJson()

      Convert object to JSON representation
      Returns:
        JSON representation

Copyright © 2022 Eclipse. All rights reserved.