MySQL 9.0.0
Source Code Documentation
mysql_transaction_delegate_control_imp.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 MYSQL_TRANSACTION_DELEGATE_CONTROL
25#define MYSQL_TRANSACTION_DELEGATE_CONTROL
26
29
30/**
31 @class mysql_new_transaction_control_imp
32 This class is the implementation of service mysql_new_transaction_control.
33
34 @sa service mysql_new_transaction_control
35*/
37 public:
38 /**
39 Method to stop new incoming transactions allowing some management queries
40 to run. New incoming transactions are rolled back.
41 */
42 static DEFINE_METHOD(void, stop, ());
43
44 /**
45 Method that allows the transactions which were earlier stopped by
46 stop method.
47 */
48 static DEFINE_METHOD(void, allow, ());
49};
50
51/**
52 @class mysql_before_commit_transaction_control_imp
53 This class is the implementation of service
54 mysql_before_commit_transaction_control.
55
56 @sa service mysql_before_commit_transaction_control
57*/
59 public:
60 /**
61 Method rollback any transaction that reaches the commit stage.
62 */
63 static DEFINE_METHOD(void, stop, ());
64
65 /**
66 Method re-allows the commit, earlier stopped in stop function.
67 */
68 static DEFINE_METHOD(void, allow, ());
69};
70
71/* clang-format off */
72/**
73 @class mysql_close_connection_of_binloggable_transaction_not_reached_commit_imp
74 This class is the implementation of service
75 mysql_close_connection_of_binloggable_transaction_not_reached_commit.
76
77 @sa service
78 mysql_close_connection_of_binloggable_transaction_not_reached_commit
79*/
80/* clang-format on */
82 public:
83 /**
84 Method that gracefully closes the client connection which are running a
85 binloggable transactions that did not reach the commit stage.
86 */
87 static DEFINE_METHOD(void, close, ());
88};
89
90#endif
This class is the implementation of service mysql_before_commit_transaction_control.
Definition: mysql_transaction_delegate_control_imp.h:58
static void stop() noexcept
Method rollback any transaction that reaches the commit stage.
Definition: transaction_delegate_control_imp.cc:92
static void allow() noexcept
Method re-allows the commit, earlier stopped in stop function.
Definition: transaction_delegate_control_imp.cc:103
This class is the implementation of service mysql_close_connection_of_binloggable_transaction_not_rea...
Definition: mysql_transaction_delegate_control_imp.h:81
static void close() noexcept
Method that gracefully closes the client connection which are running a binloggable transactions that...
Definition: transaction_delegate_control_imp.cc:82
This class is the implementation of service mysql_new_transaction_control.
Definition: mysql_transaction_delegate_control_imp.h:36
static void allow() noexcept
Method that allows the transactions which were earlier stopped by stop method.
Definition: transaction_delegate_control_imp.cc:35
static void stop() noexcept
Method to stop new incoming transactions allowing some management queries to run.
Definition: transaction_delegate_control_imp.cc:31
Specifies macros to define Components.
#define DEFINE_METHOD(retval, name, args)
A macro to ensure method implementation has required properties, that is it does not throw exceptions...
Definition: service_implementation.h:79