MySQL 8.0.40
Source Code Documentation
server_services_references.h
Go to the documentation of this file.
1/* Copyright (c) 2022, 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 GR_SERVER_SERVICES_REFERENCES
25#define GR_SERVER_SERVICES_REFERENCES
26
31#include <string>
32
33/**
34 @class Server_services_references
35
36 This class holds the references to server services that
37 Group Replication acquires on plugin install.
38 server services are the ones implemented on
39 `sql/server_component` folder.
40*/
42 public:
44
46
47 /**
48 Deleted copy ctor.
49 */
51
52 /**
53 Deleted move ctor.
54 */
56
57 /**
58 Deleted assignment operator.
59 */
61 delete;
62
63 /**
64 Deleted move operator.
65 */
67 delete;
68
69 /**
70 Acquire the server services.
71
72 @return Operation status
73 @retval false Successful
74 @retval true Error
75 */
76 bool initialize();
77
78 /**
79 Release the server services.
80
81 @return Operation status
82 @retval false Successful
83 @retval true Error
84 */
85 bool finalize();
86
87 /* clang-format off */
88 SERVICE_TYPE(registry) *registry_service{nullptr};
89 SERVICE_TYPE(mysql_charset) *mysql_charset_service{nullptr};
90 SERVICE_TYPE(mysql_string_factory) *mysql_string_factory_service{nullptr};
91 SERVICE_TYPE(mysql_string_charset_converter) *mysql_string_charset_converter_service{nullptr};
92 SERVICE_TYPE(mysql_system_variable_update_string) *mysql_system_variable_update_string_service{nullptr};
93 SERVICE_TYPE(mysql_system_variable_update_integer) *mysql_system_variable_update_integer_service{nullptr};
94 SERVICE_TYPE(component_sys_variable_register) *component_sys_variable_register_service{nullptr};
95 /* clang-format on */
96
97 private:
98 /* clang-format off */
105 /* clang-format on */
106};
107
108#endif // GR_SERVER_SERVICES_REFERENCES
This class holds the references to server services that Group Replication acquires on plugin install.
Definition: server_services_references.h:41
my_h_service m_mysql_string_charset_converter_handle
Definition: server_services_references.h:101
bool initialize()
Acquire the server services.
Definition: server_services_references.cc:28
const mysql_service_component_sys_variable_register_t * component_sys_variable_register_service
Definition: server_services_references.h:94
Server_services_references()=default
Server_services_references(const Server_services_references &)=delete
Deleted copy ctor.
my_h_service m_mysql_string_factory_handle
Definition: server_services_references.h:100
const mysql_service_mysql_system_variable_update_string_t * mysql_system_variable_update_string_service
Definition: server_services_references.h:92
my_h_service m_mysql_charset_handle
Definition: server_services_references.h:99
bool finalize()
Release the server services.
Definition: server_services_references.cc:99
Server_services_references(const Server_services_references &&)=delete
Deleted move ctor.
const mysql_service_mysql_charset_t * mysql_charset_service
Definition: server_services_references.h:89
const mysql_service_mysql_string_factory_t * mysql_string_factory_service
Definition: server_services_references.h:90
my_h_service m_mysql_system_variable_update_string_handle
Definition: server_services_references.h:102
my_h_service m_mysql_system_variable_update_integer_handle
Definition: server_services_references.h:103
virtual ~Server_services_references()
Definition: server_services_references.cc:26
const mysql_service_mysql_string_charset_converter_t * mysql_string_charset_converter_service
Definition: server_services_references.h:91
Server_services_references & operator=(const Server_services_references &&)=delete
Deleted move operator.
const mysql_service_mysql_system_variable_update_integer_t * mysql_system_variable_update_integer_service
Definition: server_services_references.h:93
const mysql_service_registry_t * registry_service
Definition: server_services_references.h:88
Server_services_references & operator=(const Server_services_references &)=delete
Deleted assignment operator.
my_h_service m_component_sys_variable_register_handle
Definition: server_services_references.h:104
struct my_h_service_imp * my_h_service
A handle type for acquired Service.
Definition: registry.h:33
#define SERVICE_TYPE(name)
Generates the standard Service type name.
Definition: service.h:76
Declaration of the registry plugin service.