aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/bmcluster/bm_document_db_stats.h
blob: 33559fcc26f6f23aca2b6b7ebee52493d7537a9a (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
30
31
32
// 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 stats for a document db
 */
class BmDocumentDbStats
{
    uint64_t _active_docs;
    uint64_t _stored_docs;
    uint64_t _total_docs;
    uint64_t _removed_docs;
    
public:
    BmDocumentDbStats();
    BmDocumentDbStats(uint64_t active_docs, uint64_t stored_docs, uint64_t total_docs, uint64_t removed_docs);
    ~BmDocumentDbStats();
    BmDocumentDbStats& operator+=(const BmDocumentDbStats& rhs);
    bool operator==(const BmDocumentDbStats &rhs) const;
    uint64_t get_active_docs() const noexcept { return _active_docs; }
    uint64_t get_stored_docs() const noexcept { return _stored_docs; }
    uint64_t get_total_docs() const noexcept { return _total_docs; }
    uint64_t get_removed_docs() const noexcept { return _removed_docs; }
};


}