io.vertx.kafka.client.common

## Class TopicPartition

- java.lang.Object
- - io.vertx.kafka.client.common.TopicPartition

-     public class TopicPartition
      extends Object

  Represent information related to a partition for a topic

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TopicPartition()` Constructor
    `TopicPartition(JsonObject json)` Constructor (from JSON representation)
    `TopicPartition(String topic, int partition)` Constructor
    `TopicPartition(TopicPartition that)` Constructor (copy)

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getPartition()`
    `String` | `getTopic()`
    `TopicPartition` | `setPartition(int partition)` Set the partition number
    `TopicPartition` | `setTopic(String topic)` Set the topic name
    `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

    - #### TopicPartition

          public TopicPartition()

      Constructor

    - #### TopicPartition

          public TopicPartition(String topic,
                                int partition)

      Constructor
      Parameters:
        `topic` - the topic name
        `partition` - the partition number

    - #### TopicPartition

          public TopicPartition(JsonObject json)

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

    - #### TopicPartition

          public TopicPartition(TopicPartition that)

      Constructor (copy)
      Parameters:
        `that` - object to copy

  - ### Method Detail

    - #### getTopic

          public String getTopic()

      Returns:
        the topic name

    - #### setTopic

          public TopicPartition setTopic(String topic)

      Set the topic name
      Parameters:
        `topic` - the topic name
      Returns:
        current instance of the class to be fluent

    - #### getPartition

          public int getPartition()

      Returns:
        the partition number

    - #### setPartition

          public TopicPartition setPartition(int partition)

      Set the partition number
      Parameters:
        `partition` - the partition number
      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`

Copyright © 2017. All rights reserved.