public class TopicPartition extends Object
Constructor and Description |
---|
TopicPartition()
Constructor
|
TopicPartition(JsonObject json)
Constructor (from JSON representation)
|
TopicPartition(String topic,
int partition)
Constructor
|
TopicPartition(TopicPartition that)
Constructor (copy)
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getPartition() |
String |
getTopic() |
int |
hashCode() |
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() |
public TopicPartition()
public TopicPartition(String topic, int partition)
topic
- the topic namepartition
- the partition numberpublic TopicPartition(JsonObject json)
json
- JSON representationpublic TopicPartition(TopicPartition that)
that
- object to copypublic String getTopic()
public TopicPartition setTopic(String topic)
topic
- the topic namepublic int getPartition()
public TopicPartition setPartition(int partition)
partition
- the partition numberpublic JsonObject toJson()
Copyright © 2024 Eclipse. All rights reserved.