Add some other methods to TopicPartitionList

This commit is contained in:
Matias Fontanini
2016-05-21 20:06:54 -07:00
parent 1c51bb72f4
commit 12621b11ad
2 changed files with 35 additions and 0 deletions

View File

@@ -28,6 +28,10 @@ public:
TopicPartitionList& operator=(TopicPartitionList&&) = default;
void add(const TopicPartition& topic_partition);
void update(const TopicPartition& topic_partition);
bool remove(const TopicPartition& topic_partition);
bool contains(const TopicPartition& topic_partition) const;
size_t size() const;
bool empty() const;
@@ -40,6 +44,8 @@ private:
static HandlePtr make_handle(rd_kafka_topic_partition_list_t* ptr);
rd_kafka_topic_partition_t* get_topic_partition(const TopicPartition& topic_partition) const;
HandlePtr handle_;
};