Add TopicPartition::set_offset

This commit is contained in:
Matias Fontanini
2016-06-26 09:06:09 -07:00
parent c878049253
commit 25ae15444e
2 changed files with 9 additions and 0 deletions

View File

@@ -107,6 +107,11 @@ public:
*/
int64_t get_offset() const;
/**
* Sets the offset
*/
void set_offset(int64_t offset);
/**
* Print to a stream
*/

View File

@@ -73,6 +73,10 @@ int64_t TopicPartition::get_offset() const {
return offset_;
}
void TopicPartition::set_offset(int64_t offset) {
offset_ = offset;
}
ostream& operator<<(ostream& output, const TopicPartition& rhs) {
return output << rhs.get_topic() << "[" << rhs.get_partition() << "]";
}