MySQL 9.1.0
Source Code Documentation
recovery_channel_state_observer.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 RECOVERY_CHANNEL_STATE_OBSERVER_INCLUDE
25#define RECOVERY_CHANNEL_STATE_OBSERVER_INCLUDE
26
27#include "my_inttypes.h"
30
32 public:
35
36 /** Observer for receiver thread starts */
37 int thread_start(Binlog_relay_IO_param *param) override;
38
39 /** Observer for receiver thread stops */
40 int thread_stop(Binlog_relay_IO_param *param) override;
41
42 /** Observer for applier thread starts */
43 int applier_start(Binlog_relay_IO_param *param) override;
44
45 /** Observer for applier thread stops */
46 int applier_stop(Binlog_relay_IO_param *param, bool aborted) override;
47
48 /** Observer for when a new transmission from a another server is requested*/
50 uint32 flags) override;
51
52 /** Observer for whenever a event is read by the receiver thread*/
53 int after_read_event(Binlog_relay_IO_param *param, const char *packet,
54 unsigned long len, const char **event_buf,
55 unsigned long *event_len) override;
56
57 /** Observer for whenever a event is queued by the receiver thread*/
58 int after_queue_event(Binlog_relay_IO_param *param, const char *event_buf,
59 unsigned long event_len, uint32 flags) override;
60
61 /** Observer for whenever a reset replica is executed */
62 int after_reset_slave(Binlog_relay_IO_param *param) override;
63
64 /** Observer for applier skip event */
66 int &out) override;
67
68 private:
70};
71
72#endif /* RECOVERY_CHANNEL_STATE_OBSERVER_INCLUDE */
A interface class to code channel state response methods.
Definition: channel_observation_manager.h:38
Definition: recovery_channel_state_observer.h:31
Recovery_state_transfer * recovery_state_transfer
Definition: recovery_channel_state_observer.h:69
int thread_start(Binlog_relay_IO_param *param) override
Observer for receiver thread starts.
Definition: recovery_channel_state_observer.cc:30
int after_queue_event(Binlog_relay_IO_param *param, const char *event_buf, unsigned long event_len, uint32 flags) override
Observer for whenever a event is queued by the receiver thread.
Definition: recovery_channel_state_observer.cc:64
int thread_stop(Binlog_relay_IO_param *param) override
Observer for receiver thread stops.
Definition: recovery_channel_state_observer.cc:34
int before_request_transmit(Binlog_relay_IO_param *param, uint32 flags) override
Observer for when a new transmission from a another server is requested.
Definition: recovery_channel_state_observer.cc:51
int after_read_event(Binlog_relay_IO_param *param, const char *packet, unsigned long len, const char **event_buf, unsigned long *event_len) override
Observer for whenever a event is read by the receiver thread.
Definition: recovery_channel_state_observer.cc:56
int applier_log_event(Binlog_relay_IO_param *param, Trans_param *trans_param, int &out) override
Observer for applier skip event.
Definition: recovery_channel_state_observer.cc:75
int applier_start(Binlog_relay_IO_param *param) override
Observer for applier thread starts.
Definition: recovery_channel_state_observer.cc:40
int after_reset_slave(Binlog_relay_IO_param *param) override
Observer for whenever a reset replica is executed.
Definition: recovery_channel_state_observer.cc:70
Recovery_channel_state_observer(Recovery_state_transfer *recovery_state_transfer)
Definition: recovery_channel_state_observer.cc:26
int applier_stop(Binlog_relay_IO_param *param, bool aborted) override
Observer for applier thread stops.
Definition: recovery_channel_state_observer.cc:44
Definition: recovery_state_transfer.h:45
static int flags[50]
Definition: hp_test1.cc:40
Some integer typedefs for easier portability.
uint32_t uint32
Definition: my_inttypes.h:67
Replication binlog relay IO observer parameter.
Definition: replication.h:602
Transaction observer parameter.
Definition: replication.h:136