client-cpp  0.8.1
BucketInfo.hpp
Go to the documentation of this file.
1 
17 #ifndef BUCKETINFO_HPP_
18 #define BUCKETINFO_HPP_
19 
20 #include <cstdint>
21 
22 namespace kaa {
23 
31 class BucketInfo {
32 public:
37 
44  BucketInfo(std::int32_t bucketId, std::size_t logCount)
45  : bucketId_(bucketId), logCount_(logCount) {}
46 
54  std::int32_t getBucketId() const {
55  return bucketId_;
56  }
57 
61  std::size_t getLogCount() const {
62  return logCount_;
63  }
64 
65  bool operator<(const BucketInfo& info) const {
66  return bucketId_ < info.bucketId_;
67  }
68 
69  bool operator==(const BucketInfo& info) const {
70  return bucketId_ == info.bucketId_;
71  }
72 
73  bool operator!=(const BucketInfo& info) const {
74  return bucketId_ != info.bucketId_;
75  }
76 
77 private:
78  std::int32_t bucketId_ = 0;
79  std::size_t logCount_ = 0;
80 };
81 } /* namespace kaa */
82 
83 #endif /* BUCKETINFO_HPP_ */
bool operator<(const BucketInfo &info) const
Definition: BucketInfo.hpp:65
BucketInfo()
Constructs an empty BucketInfo object.
Definition: BucketInfo.hpp:36
bool operator==(const BucketInfo &info) const
Definition: BucketInfo.hpp:69
bool operator!=(const BucketInfo &info) const
Definition: BucketInfo.hpp:73
std::int32_t getBucketId() const
Returns the id of a bucket.
Definition: BucketInfo.hpp:54
BucketInfo(std::int32_t bucketId, std::size_t logCount)
Constructs the BucketInfo object which contains a useful information about a log bucket.
Definition: BucketInfo.hpp:44
Describes a unique log bucket.
Definition: BucketInfo.hpp:31
std::size_t getLogCount() const
Definition: BucketInfo.hpp:61