Couchbase C++ SDK
1.4.0 (rev. 59aa900)
Toggle main menu visibility
Loading...
Searching...
No Matches
meter.hxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2
/*
3
* Copyright 2021 Couchbase, Inc.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#pragma once
19
20
#include <cstdint>
21
#include <map>
22
#include <memory>
23
#include <string>
24
25
namespace
couchbase::metrics
26
{
27
class
value_recorder
28
{
29
public
:
30
value_recorder
() =
default
;
31
value_recorder
(
const
value_recorder
& other) =
default
;
32
value_recorder
(
value_recorder
&& other) =
default
;
33
auto
operator=
(
const
value_recorder
& other) ->
value_recorder
& =
default
;
34
auto
operator=
(
value_recorder
&& other) ->
value_recorder
& =
default
;
35
virtual
~value_recorder
() =
default
;
36
37
virtual
void
record_value
(std::int64_t value) = 0;
38
};
39
40
class
meter
41
{
42
public
:
43
meter
() =
default
;
44
meter
(
const
meter
& other) =
default
;
45
meter
(
meter
&& other) =
default
;
46
auto
operator=
(
const
meter
& other) ->
meter
& =
default
;
47
auto
operator=
(
meter
&& other) ->
meter
& =
default
;
48
virtual
~meter
() =
default
;
49
54
virtual
void
start
()
55
{
56
/* do nothing */
57
}
58
62
virtual
void
stop
()
63
{
64
/* do nothing */
65
}
66
67
virtual
auto
get_value_recorder
(
const
std::string& name,
68
const
std::map<std::string, std::string>& tags)
69
-> std::shared_ptr<value_recorder> = 0;
70
};
71
72
}
// namespace couchbase::metrics
couchbase::metrics::meter::operator=
auto operator=(const meter &other) -> meter &=default
couchbase::metrics::meter::meter
meter(meter &&other)=default
couchbase::metrics::meter::start
virtual void start()
SDK invokes this method when cluster is ready to emit metrics.
Definition
meter.hxx:54
couchbase::metrics::meter::meter
meter()=default
couchbase::metrics::meter::meter
meter(const meter &other)=default
couchbase::metrics::meter::operator=
auto operator=(meter &&other) -> meter &=default
couchbase::metrics::meter::get_value_recorder
virtual auto get_value_recorder(const std::string &name, const std::map< std::string, std::string > &tags) -> std::shared_ptr< value_recorder >=0
couchbase::metrics::meter::~meter
virtual ~meter()=default
couchbase::metrics::meter::stop
virtual void stop()
SDK invokes this method when cluster is closed.
Definition
meter.hxx:62
couchbase::metrics::value_recorder::operator=
auto operator=(value_recorder &&other) -> value_recorder &=default
couchbase::metrics::value_recorder::value_recorder
value_recorder(const value_recorder &other)=default
couchbase::metrics::value_recorder::value_recorder
value_recorder(value_recorder &&other)=default
couchbase::metrics::value_recorder::value_recorder
value_recorder()=default
couchbase::metrics::value_recorder::~value_recorder
virtual ~value_recorder()=default
couchbase::metrics::value_recorder::operator=
auto operator=(const value_recorder &other) -> value_recorder &=default
couchbase::metrics::value_recorder::record_value
virtual void record_value(std::int64_t value)=0
couchbase::metrics
Definition
meter.hxx:26
couchbase
metrics
meter.hxx
Generated by
1.17.0