Package io.vertx.kafka.client.common
Class TopicPartition
java.lang.Object
io.vertx.kafka.client.common.TopicPartition
Represent information related to a partition for a topic
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorTopicPartition(JsonObject json) Constructor (from JSON representation)TopicPartition(TopicPartition that) Constructor (copy)TopicPartition(String topic, int partition) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetTopic()inthashCode()setPartition(int partition) Set the partition numberSet the topic nametoJson()Convert object to JSON representationtoString()
-
Constructor Details
-
TopicPartition
public TopicPartition()Constructor -
TopicPartition
Constructor- Parameters:
topic- the topic namepartition- the partition number
-
TopicPartition
Constructor (from JSON representation)- Parameters:
json- JSON representation
-
TopicPartition
Constructor (copy)- Parameters:
that- object to copy
-
-
Method Details
-
getTopic
- Returns:
- the topic name
-
setTopic
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
Set the partition number- Parameters:
partition- the partition number- Returns:
- current instance of the class to be fluent
-
toJson
Convert object to JSON representation- Returns:
- JSON representation
-
toString
-
equals
-
hashCode
public int hashCode()
-