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()` | Constructor
    `OffsetAndMetadata​(long offset, String metadata)` | Constructor
    `OffsetAndMetadata​(JsonObject json)` | Constructor (from JSON representation)
    `OffsetAndMetadata​(OffsetAndMetadata that)` | Constructor (copy)

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getMetadata()` |
    `long` | `getOffset()` |
    `OffsetAndMetadata` | `setMetadata​(String metadata)` | Set additional metadata for the offset committed
    `OffsetAndMetadata` | `setOffset​(long offset)` | Set the offset to commit
    `JsonObject` | `toJson()` | Convert object to JSON representation
    `String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### OffsetAndMetadata

          public OffsetAndMetadata()

      Constructor

    - #### OffsetAndMetadata

          public OffsetAndMetadata​(long offset,
                                   String metadata)

      Constructor
      Parameters:
        `offset` - offset to commit
        `metadata` - 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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`