aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/bmcluster/storage_reply_error_checker.h
blob: 8e2942617e2a781213250e03a5212c669646371d (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <atomic>

namespace storage::api { class StorageMessage; }

namespace search::bmcluster {

/*
 * Class tracking errors in storage replies.
 */
class StorageReplyErrorChecker {
protected:
    std::atomic<uint32_t> _errors;
public:
    StorageReplyErrorChecker();
    ~StorageReplyErrorChecker();
    void check_error(const storage::api::StorageMessage &msg);
    uint32_t get_error_count() const { return _errors; }
};

}