MySQL 9.1.0
Source Code Documentation
statistics_storage_interface.h
Go to the documentation of this file.
1/* Copyright (c) 2023, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef STATISTICS_STORAGE_INTERFACE_H
25#define STATISTICS_STORAGE_INTERFACE_H
26
27#include <stdint.h>
28
29/**
30 * @brief Interface class for all statistics that XCom will provide.
31 *
32 */
34 public:
36
37 /**
38 * @brief Adds one successful PAXOS round
39 *
40 */
41 virtual void add_sucessful_paxos_round() = 0;
42
43 /**
44 * @brief Adds one Noop proposal round
45 *
46 */
47 virtual void add_empty_proposal_round() = 0;
48
49 /**
50 * @brief Adds to bytes sent to all members
51 *
52 * @param bytes_sent the amount of bytes sent to the network.
53 */
54 virtual void add_bytes_sent(uint64_t bytes_sent) = 0;
55
56 /**
57 * @brief Adds to the cumulative proposal time
58 *
59 * @param proposal_time Proposal time to add
60 */
61 virtual void add_proposal_time(unsigned long long proposal_time) = 0;
62
63 /**
64 * @brief Adds one 3-Phase PAXOS round
65 *
66 */
67 virtual void add_three_phase_paxos() = 0;
68
69 /**
70 * @brief Adds one message sent.
71 *
72 */
73 virtual void add_message() = 0;
74
75 /**
76 * @brief Adds to bytes received in this member
77 */
78 virtual void add_bytes_received(uint64_t bytes_received) = 0;
79
80 /**
81 * @brief Sets the last proposal time
82 */
83 virtual void set_last_proposal_time(unsigned long long proposal_time) = 0;
84};
85
86#endif // STATISTICS_STORAGE_INTERFACE_H
Interface class for all statistics that XCom will provide.
Definition: statistics_storage_interface.h:33
virtual void add_bytes_received(uint64_t bytes_received)=0
Adds to bytes received in this member.
virtual void add_message()=0
Adds one message sent.
virtual void add_three_phase_paxos()=0
Adds one 3-Phase PAXOS round.
virtual ~Xcom_statistics_storage_interface()=default
virtual void add_bytes_sent(uint64_t bytes_sent)=0
Adds to bytes sent to all members.
virtual void add_proposal_time(unsigned long long proposal_time)=0
Adds to the cumulative proposal time.
virtual void add_sucessful_paxos_round()=0
Adds one successful PAXOS round.
virtual void set_last_proposal_time(unsigned long long proposal_time)=0
Sets the last proposal time.
virtual void add_empty_proposal_round()=0
Adds one Noop proposal round.