MySQL 8.4.2
Source Code Documentation
gcs_xcom_statistics_interface.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 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 GCS_XCOM_STATISTICS_INTERFACE_INCLUDED
25#define GCS_XCOM_STATISTICS_INTERFACE_INCLUDED
26
27#include <time.h>
28#include <algorithm>
29
32
33/**
34 @class Gcs_xcom_statistics_interface
35
36 This class implements the Gcs_statistics_interface and updater.
37*/
39 public:
40 explicit Gcs_xcom_statistics(
43
44 // Implementation of Gcs_statistics_interface
45 /**
46 * @see Gcs_statistics_interface::get_all_sucessful_proposal_rounds
47 */
48 uint64_t get_all_sucessful_proposal_rounds() const override;
49
50 /**
51 * @see Gcs_statistics_interface::get_all_empty_proposal_rounds
52 */
53 uint64_t get_all_empty_proposal_rounds() const override;
54
55 /**
56 * @see Gcs_statistics_interface::get_all_bytes_sent
57 */
58 uint64_t get_all_bytes_sent() const override;
59
60 /**
61 * @see Gcs_statistics_interface::get_cumulative_proposal_time
62 */
63 unsigned long long get_cumulative_proposal_time() const override;
64
65 /**
66 * @see Gcs_statistics_interface::get_suspicious_count
67 */
69 std::list<Gcs_node_suspicious> &suspicious_out) const override;
70
71 /**
72 * @see Gcs_statistics_interface::get_all_full_proposal_count
73 */
74 uint64_t get_all_full_proposal_count() const override;
75
76 /**
77 * @see Gcs_statistics_interface::get_all_messages_sent
78 */
79 uint64_t get_all_messages_sent() const override;
80
81 /**
82 * @see Gcs_statistics_interface::get_all_message_bytes_received
83 */
84 uint64_t get_all_message_bytes_received() const override;
85
86 /**
87 * @see Gcs_statistics_interface::get_last_proposal_round_time
88 */
89 unsigned long long get_last_proposal_round_time() const override;
90
91 private:
93};
94
95#endif /* GCS_XCOM_STATISTICS_INTERFACE_INCLUDED */
This interface represents all statistics that a binding implementation should provide.
Definition: gcs_statistics_interface.h:49
This class is the storage and provider of all statistics coming from either XCom and GCS.
Definition: gcs_xcom_statistics_manager.h:65
Definition: gcs_xcom_statistics_interface.h:38
void get_suspicious_count(std::list< Gcs_node_suspicious > &suspicious_out) const override
Definition: gcs_xcom_statistics_interface.cc:44
~Gcs_xcom_statistics() override
unsigned long long get_cumulative_proposal_time() const override
Definition: gcs_xcom_statistics_interface.cc:65
unsigned long long get_last_proposal_round_time() const override
Definition: gcs_xcom_statistics_interface.cc:69
uint64_t get_all_bytes_sent() const override
Definition: gcs_xcom_statistics_interface.cc:40
uint64_t get_all_empty_proposal_rounds() const override
Definition: gcs_xcom_statistics_interface.cc:36
uint64_t get_all_messages_sent() const override
Definition: gcs_xcom_statistics_interface.cc:57
Gcs_xcom_statistics(Gcs_xcom_statistics_manager_interface *stats_mgr)
Definition: gcs_xcom_statistics_interface.cc:26
uint64_t get_all_full_proposal_count() const override
Definition: gcs_xcom_statistics_interface.cc:53
uint64_t get_all_sucessful_proposal_rounds() const override
Definition: gcs_xcom_statistics_interface.cc:32
uint64_t get_all_message_bytes_received() const override
Definition: gcs_xcom_statistics_interface.cc:61
Gcs_xcom_statistics_manager_interface * m_stats_mgr
Definition: gcs_xcom_statistics_interface.h:92
Include file for Sun RPC to compile out of the box.