aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storageframework/generic/metric/metricupdatehook.h
blob: b45713cd0ce80aef9ab095aaf4a1eb4dd3c7798a (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.
/**
 * \class storage::framework::MetricUpdateHook
 * \ingroup metric
 *
 * \brief Implement to get callbacks to update metrics periodically or just before reports/snapshots.
 */
#pragma once

#include <mutex>

namespace metrics { class MetricLockGuard; }

namespace storage::framework {

struct MetricUpdateHook {
    using MetricLockGuard = metrics::MetricLockGuard;
    virtual ~MetricUpdateHook() = default;

    virtual void updateMetrics(const MetricLockGuard &) = 0;
};

}