MySQL 8.0.42
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
gms_listener_test.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 2025, 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 GMS_LISTENER_TEST_H
25#define GMS_LISTENER_TEST_H
26
28
29#define GMS_LISTENER_EXAMPLE_NAME "group_membership_listener.gr_example"
30#define GMST_LISTENER_EXAMPLE_NAME "group_member_status_listener.gr_example"
31
34
35/**
36 An example implementation of the group_membership_listener
37 service. It is actually used for testing purposes.
38*/
40 public:
41 /**
42 @c notify_view_change(const char*)
43 */
44 static DEFINE_BOOL_METHOD(notify_view_change, (const char *));
45
46 /**
47 @c notify_quorum_lost(const char*)
48 */
49 static DEFINE_BOOL_METHOD(notify_quorum_lost, (const char *));
50};
51
52/**
53 An example implementation of the group_member_status_listener
54 service. It is actually used for testing purposes.
55*/
57 public:
58 /**
59 @c notify_member_role_change(const char*)
60 */
61 static DEFINE_BOOL_METHOD(notify_member_role_change, (const char *));
62
63 /**
64 @c notify_member_state_change(const char*)
65 */
66 static DEFINE_BOOL_METHOD(notify_member_state_change, (const char *));
67};
68
69#endif /* GMS_LISTENER_TEST_H */
An example implementation of the group_member_status_listener service.
Definition: gms_listener_test.h:56
static mysql_service_status_t notify_member_state_change(const char *) noexcept
notify_member_state_change(const char*)
Definition: gms_listener_test.cc:180
static mysql_service_status_t notify_member_role_change(const char *) noexcept
notify_member_role_change(const char*)
Definition: gms_listener_test.cc:170
An example implementation of the group_membership_listener service.
Definition: gms_listener_test.h:39
static mysql_service_status_t notify_view_change(const char *) noexcept
notify_view_change(const char*)
Definition: gms_listener_test.cc:151
static mysql_service_status_t notify_quorum_lost(const char *) noexcept
notify_quorum_lost(const char*)
Definition: gms_listener_test.cc:160
void unregister_listener_service_gr_example()
Definition: gms_listener_test.cc:230
void register_listener_service_gr_example()
Definition: gms_listener_test.cc:234
Specifies macros to define Service Implementations.
#define DEFINE_BOOL_METHOD(name, args)
A short macro to define method that returns bool, which is the most common case.
Definition: service_implementation.h:88