Merge pull request #215 from accelerated/partition

Added method to set the partition
This commit is contained in:
Matias Fontanini
2019-07-29 09:11:01 -07:00
committed by GitHub
2 changed files with 9 additions and 0 deletions

View File

@@ -106,6 +106,11 @@ public:
* Gets the offset * Gets the offset
*/ */
int64_t get_offset() const; int64_t get_offset() const;
/**
* @brief Sets the partition
*/
void set_partition(int partition);
/** /**
* Sets the offset * Sets the offset

View File

@@ -76,6 +76,10 @@ int64_t TopicPartition::get_offset() const {
return offset_; return offset_;
} }
void TopicPartition::set_partition(int partition) {
partition_ = partition;
}
void TopicPartition::set_offset(int64_t offset) { void TopicPartition::set_offset(int64_t offset) {
offset_ = offset; offset_ = offset;
} }