aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/bmcluster/bm_buckets_stats.h
blob: ca018ff3b50c192dc853510e90de0b476c790fea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <cstdint>

namespace search::bmcluster {

/*
 * Class containing bucket stats
 */
class BmBucketsStats
{
    uint64_t _buckets;
    uint64_t _buckets_pending;  // Buckets with pending ideal state operations
    bool     _valid;
    
public:
    BmBucketsStats();
    BmBucketsStats(uint64_t buckets, uint64_t buckets_pending, bool valid);
    ~BmBucketsStats();
    BmBucketsStats& operator+=(const BmBucketsStats& rhs);
    bool operator==(const BmBucketsStats &rhs) const;
    uint64_t get_buckets() const noexcept { return _buckets; }
    uint64_t get_buckets_pending() const noexcept { return _buckets_pending; }
    bool get_valid() const noexcept { return _valid; }
};

}