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 Details

    • 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 Details

    • 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
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object