aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/document_db_flush_config.h
blob: 81b41889ba88423223d7ebca2d77374106ce8822 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <cstdint>

namespace proton {

/*
 * Flush config, used to adjust flush targets as needed.
 */
class DocumentDBFlushConfig {
    uint32_t _maxFlushed;
    uint32_t _maxFlushedRetired;

public:
    DocumentDBFlushConfig() noexcept;
    DocumentDBFlushConfig(uint32_t maxFlushed, uint32_t maxFlushedRetired) noexcept;
    bool operator==(const DocumentDBFlushConfig &rhs) const noexcept;
    uint32_t getMaxFlushed() const noexcept { return _maxFlushed; }
    uint32_t getMaxFlushedRetired() const noexcept { return _maxFlushedRetired; }
};

} // namespace proton