MySQL
9.3.0
Source Code Documentation
connection_control_interfaces.h
Go to the documentation of this file.
1
/* Copyright (c) 2024, 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 CONNECTION_CONTROL_INTERFACES_H
25
#define CONNECTION_CONTROL_INTERFACES_H
26
27
#include <string>
/* std::string */
28
#include <vector>
/* std::vector */
29
#include "
connection_control.h
"
30
#include "
connection_control_data.h
"
/* Variables and Status */
31
32
namespace
connection_control
{
33
/* Typedefs for convenience */
34
typedef
std::string
Sql_string
;
35
36
/* Forward declaration */
37
class
Connection_event_coordinator
;
38
39
/**
40
Interface for defining action on connection events
41
*/
42
class
Connection_event_observer
{
43
public
:
44
virtual
bool
notify_event
(
45
MYSQL_THD
thd,
Connection_event_coordinator
*coordinator,
46
const
mysql_event_tracking_connection_data
*connection_event) = 0;
47
virtual
bool
notify_sys_var
(
Connection_event_coordinator
*coordinator,
48
opt_connection_control
variable,
49
void
*new_value) = 0;
50
virtual
~Connection_event_observer
() =
default
;
51
};
52
53
/* Status variable action enum */
54
typedef
enum
status_var_action
{
55
ACTION_NONE
= 0,
56
ACTION_INC
,
57
ACTION_RESET
,
58
ACTION_LAST
/* Must be at the end */
59
}
status_var_action
;
60
}
// namespace connection_control
61
#endif
// !CONNECTION_CONTROL_INTERFACES_H
MYSQL_THD
#define MYSQL_THD
Definition:
backup_page_tracker.h:38
connection_control::Connection_event_coordinator
Connection event coordinator.
Definition:
connection_control_coordinator.h:65
connection_control::Connection_event_observer
Interface for defining action on connection events.
Definition:
connection_control_interfaces.h:42
connection_control::Connection_event_observer::~Connection_event_observer
virtual ~Connection_event_observer()=default
connection_control::Connection_event_observer::notify_event
virtual bool notify_event(MYSQL_THD thd, Connection_event_coordinator *coordinator, const mysql_event_tracking_connection_data *connection_event)=0
connection_control::Connection_event_observer::notify_sys_var
virtual bool notify_sys_var(Connection_event_coordinator *coordinator, opt_connection_control variable, void *new_value)=0
connection_control.h
connection_control_data.h
opt_connection_control
opt_connection_control
Enum for system variables : Must be in sync with members of Connection_control_variables.
Definition:
connection_control_data.h:35
connection_control
Definition:
connection_control.h:70
connection_control::Sql_string
std::string Sql_string
Definition:
connection_control_interfaces.h:34
connection_control::status_var_action
status_var_action
Definition:
connection_control_interfaces.h:54
connection_control::ACTION_RESET
@ ACTION_RESET
Definition:
connection_control_interfaces.h:57
connection_control::ACTION_LAST
@ ACTION_LAST
Definition:
connection_control_interfaces.h:58
connection_control::ACTION_NONE
@ ACTION_NONE
Definition:
connection_control_interfaces.h:55
connection_control::ACTION_INC
@ ACTION_INC
Definition:
connection_control_interfaces.h:56
mysql_event_tracking_connection_data
Structure for Connection event tracking.
Definition:
event_tracking_connection_defs.h:60
components
connection_control
connection_control_interfaces.h
Generated by
1.9.2