23#ifndef GCS_XCOM_NOTIFICATION_INCLUDED
24#define GCS_XCOM_NOTIFICATION_INCLUDED
36#include "plugin/group_replication/libmysqlgcs/xdr_gen/xcom_vp.h"
330 synode_no,
u_int,
char *);
352 synode_no message_id, synode_no origin,
354 u_int size,
char *data);
465 xcom_event_horizon, synode_no);
487 synode_no config_id, synode_no message_id,
489 xcom_event_horizon event_horizon,
Notification used to make a node join or leave the cluster, provided the system was already initializ...
Definition: gcs_xcom_notification.h:616
Control_notification(xcom_control_functor *functor, Gcs_control_interface *control_if)
Constructor for Control_notification.
Definition: gcs_xcom_notification.cc:134
xcom_control_functor * m_functor
Definition: gcs_xcom_notification.h:645
void do_execute() override
Task implemented by this notification.
Definition: gcs_xcom_notification.cc:140
Control_notification(Control_notification const &)
Control_notification & operator=(Control_notification const &)
~Control_notification() override
Destructor for Control_notification.
Gcs_control_interface * m_control_if
Definition: gcs_xcom_notification.h:651
Notification used to inform that data has been totally ordered.
Definition: gcs_xcom_notification.h:334
Data_notification & operator=(Data_notification const &)
char * m_data
Definition: gcs_xcom_notification.h:407
Data_notification(Data_notification const &)
xcom_receive_data_functor * m_functor
Definition: gcs_xcom_notification.h:374
synode_no m_message_id
Definition: gcs_xcom_notification.h:379
~Data_notification() override
Destructor for Data_notification.
void do_execute() override
Task implemented by this notification which calls the functor with the parameters provided in the con...
Definition: gcs_xcom_notification.cc:80
synode_no m_origin
Definition: gcs_xcom_notification.h:384
Gcs_xcom_nodes * m_xcom_nodes
Definition: gcs_xcom_notification.h:390
Data_notification(xcom_receive_data_functor *functor, synode_no message_id, synode_no origin, Gcs_xcom_nodes *xcom_nodes, synode_no last_removed, u_int size, char *data)
Constructor for Data_notification.
Definition: gcs_xcom_notification.cc:64
synode_no m_last_removed
Definition: gcs_xcom_notification.h:397
u_int m_size
Definition: gcs_xcom_notification.h:402
Notification used to inform that the node has been expelled or is about to be.
Definition: gcs_xcom_notification.h:665
Expel_notification & operator=(Expel_notification const &)
xcom_expel_functor * m_functor
Definition: gcs_xcom_notification.h:693
void do_execute() override
Task implemented by this notification.
Definition: gcs_xcom_notification.cc:132
Expel_notification(Expel_notification const &)
Expel_notification(xcom_expel_functor *functor)
Constructor for Expel_notification.
Definition: gcs_xcom_notification.cc:127
~Expel_notification() override
Destructor for Expel_notification.
Notification used to stop the Gcs_xcom_engine.
Definition: gcs_xcom_notification.h:248
xcom_finalize_functor * m_functor
Definition: gcs_xcom_notification.h:283
Finalize_notification(Finalize_notification const &)
Finalize_notification & operator=(Finalize_notification const &)
void do_execute() override
Task implemented by this notification.
Definition: gcs_xcom_notification.cc:37
~Finalize_notification() override
Destructor for Finalize_notification.
Gcs_xcom_engine * m_gcs_engine
Pointer to the MySQL GCS Engine.
Definition: gcs_xcom_notification.h:277
Finalize_notification(Gcs_xcom_engine *gcs_engine, xcom_finalize_functor *functor)
Constructor for Finalize_notification.
Definition: gcs_xcom_notification.cc:31
This interface represents all the control functionalities that a binding implementation must provide.
Definition: gcs_control_interface.h:110
std::uint64_t Tag
Definition: gcs_tagged_lock.h:85
Implements the communication protocol change logic.
Definition: gcs_xcom_communication_protocol_changer.h:216
Definition: gcs_xcom_notification.h:93
bool m_schedule
Definition: gcs_xcom_notification.h:181
Gcs_xcom_engine()
Constructor for Gcs_xcom_engine.
Definition: gcs_xcom_notification.cc:165
My_xp_thread_impl m_engine_thread
Definition: gcs_xcom_notification.h:176
Gcs_xcom_engine & operator=(Gcs_xcom_engine const &)
void finalize(xcom_finalize_functor *functor)
Finalize the notification processing by stopping the thread that is responsible for reading all incom...
Definition: gcs_xcom_notification.cc:191
Gcs_xcom_engine(Gcs_xcom_engine const &)
void cleanup()
Clean up the notification queue and also forbid any incoming notitification to be added to the queue.
Definition: gcs_xcom_notification.cc:228
My_xp_mutex_impl m_wait_for_notification_mutex
Definition: gcs_xcom_notification.h:165
~Gcs_xcom_engine()
Destructor for Gcs_xcom_engine.
Definition: gcs_xcom_notification.cc:177
bool push(Gcs_xcom_notification *notification)
Push a notification to the queue.
Definition: gcs_xcom_notification.cc:249
std::queue< Gcs_xcom_notification * > m_notification_queue
Definition: gcs_xcom_notification.h:170
void initialize(xcom_initialize_functor *functor)
Start the notification processing by spwaning a thread that will be responsible for reading all incom...
Definition: gcs_xcom_notification.cc:182
void process()
Process notifications from the incoming queue until an empty notifications comes in.
Definition: gcs_xcom_notification.cc:205
My_xp_cond_impl m_wait_for_notification_cond
Definition: gcs_xcom_notification.h:160
This class contains information on the configuration, i.e set of nodes or simply site definition.
Definition: gcs_xcom_group_member_information.h:390
Abstract class that defines a notification that will be sent from XCOM to MySQL GCS or from an user t...
Definition: gcs_xcom_notification.h:55
virtual bool operator()()=0
Task implemented by this notification which calls do_execute.
virtual ~Gcs_xcom_notification()=default
Destructor for the Gcs_xcom_notification.
Gcs_xcom_notification()=default
Constructor for Gcs_xcom_notification which an abstract class that represents notifications sent from...
Gcs_xcom_notification & operator=(Gcs_xcom_notification const &)
Gcs_xcom_notification(Gcs_xcom_notification const &)
Notification used to inform there have been change to the configuration, i.e.
Definition: gcs_xcom_notification.h:470
synode_no m_config_id
Definition: gcs_xcom_notification.h:514
Global_view_notification(xcom_global_view_functor *functor, synode_no config_id, synode_no message_id, Gcs_xcom_nodes *xcom_nodes, xcom_event_horizon event_horizon, synode_no max_synode)
Constructor for Global_view_notification.
Definition: gcs_xcom_notification.cc:93
xcom_event_horizon m_event_horizon
Definition: gcs_xcom_notification.h:531
void do_execute() override
Task implemented by this notification.
Definition: gcs_xcom_notification.cc:107
Global_view_notification & operator=(Global_view_notification const &)
synode_no m_message_id
Definition: gcs_xcom_notification.h:520
~Global_view_notification() override
Destructor for Global_view_notification.
synode_no m_max_synode
Definition: gcs_xcom_notification.h:538
Global_view_notification(Global_view_notification const &)
Gcs_xcom_nodes * m_xcom_nodes
Definition: gcs_xcom_notification.h:526
xcom_global_view_functor * m_functor
Definition: gcs_xcom_notification.h:509
Definition: gcs_xcom_notification.h:292
void do_execute() override
Task implemented by this notification.
Definition: gcs_xcom_notification.cc:60
Initialize_notification(Initialize_notification const &)
~Initialize_notification() override
Destructor for Initialize_notification.
Initialize_notification(xcom_initialize_functor *functor)
Constructor for Initialize_notification.
Definition: gcs_xcom_notification.cc:54
Initialize_notification & operator=(Initialize_notification const &)
xcom_initialize_functor * m_functor
Definition: gcs_xcom_notification.h:320
Notification used to provide hints on nodes' availability.
Definition: gcs_xcom_notification.h:551
Gcs_xcom_nodes * m_xcom_nodes
Definition: gcs_xcom_notification.h:595
Local_view_notification(Local_view_notification const &)
synode_no m_config_id
Definition: gcs_xcom_notification.h:590
Local_view_notification(xcom_local_view_functor *functor, synode_no config_id, Gcs_xcom_nodes *xcom_nodes, synode_no max_synode)
Constructor for Local_view_notification.
Definition: gcs_xcom_notification.cc:112
synode_no m_max_synode
Definition: gcs_xcom_notification.h:602
~Local_view_notification() override
Destructor for Local_view_notification.
Local_view_notification & operator=(Local_view_notification const &)
void do_execute() override
Task implemented by this notification.
Definition: gcs_xcom_notification.cc:123
xcom_local_view_functor * m_functor
Definition: gcs_xcom_notification.h:585
Definition: my_xp_cond.h:135
Definition: my_xp_mutex.h:122
Definition: my_xp_thread.h:138
Template that defines whether a notification shall make the engine stop or not.
Definition: gcs_xcom_notification.h:204
bool operator()() override
Task implemented by this notification which calls do_execute.
Definition: gcs_xcom_notification.h:224
virtual void do_execute()=0
Method that must be implemented buy the different types of notifications.
Parameterized_notification & operator=(Parameterized_notification const &)
Parameterized_notification()=default
Constructor for Parameterized_notification.
~Parameterized_notification() override=default
Destructor for Parameterized_notification.
Parameterized_notification(Parameterized_notification const &)
Notification used to finish a protocol change.
Definition: gcs_xcom_notification.h:708
xcom_protocol_change_functor * m_functor
Definition: gcs_xcom_notification.h:740
void do_execute() override
Task implemented by this notification.
Definition: gcs_xcom_notification.cc:152
~Protocol_change_notification() override
Destructor for Protocol_change_notification.
Protocol_change_notification & operator=(Protocol_change_notification const &)
Gcs_tagged_lock::Tag const m_tag
Definition: gcs_xcom_notification.h:748
Protocol_change_notification(xcom_protocol_change_functor *functor, Gcs_xcom_communication_protocol_changer *protocol_changer, Gcs_tagged_lock::Tag const tag)
Constructor for Protocol_change_notification.
Definition: gcs_xcom_notification.cc:144
Gcs_xcom_communication_protocol_changer * m_protocol_changer
Definition: gcs_xcom_notification.h:746
Protocol_change_notification(Protocol_change_notification const &)
Notification used to inform that has been a change in XCOM's state machine such as it has started up ...
Definition: gcs_xcom_notification.h:421
void do_execute() override
Task implemented by this notification.
Definition: gcs_xcom_notification.cc:91
xcom_status_functor * m_functor
Definition: gcs_xcom_notification.h:450
Status_notification(Status_notification const &)
int m_status
Definition: gcs_xcom_notification.h:455
~Status_notification() override
Destructor for Status_notification.
Status_notification & operator=(Status_notification const &)
Status_notification(xcom_status_functor *functor, int status)
Constructor for Status_notification.
Definition: gcs_xcom_notification.cc:85
static Gcs_xcom_engine * gcs_engine
Definition: gcs_xcom_interface.cc:143
void() xcom_receive_data_functor(synode_no, synode_no, Gcs_xcom_nodes *, synode_no, u_int, char *)
Definition: gcs_xcom_notification.h:329
void() xcom_local_view_functor(synode_no, Gcs_xcom_nodes *, synode_no)
Definition: gcs_xcom_notification.h:547
void() xcom_status_functor(int)
Definition: gcs_xcom_notification.h:416
void() xcom_finalize_functor()
Definition: gcs_xcom_notification.h:92
void() xcom_expel_functor(void)
Definition: gcs_xcom_notification.h:660
void() xcom_control_functor(Gcs_control_interface *)
Definition: gcs_xcom_notification.h:611
void() xcom_protocol_change_functor(Gcs_xcom_communication_protocol_changer *, Gcs_tagged_lock::Tag const)
Definition: gcs_xcom_notification.h:703
void() xcom_global_view_functor(synode_no, synode_no, Gcs_xcom_nodes *, xcom_event_horizon, synode_no)
Definition: gcs_xcom_notification.h:464
void() xcom_initialize_functor()
Definition: gcs_xcom_notification.h:91
required uint32 status
Definition: replication_asynchronous_connection_failover.proto:60
__u_int u_int
Definition: types.h:72
synode_no max_synode
Definition: xcom_base.cc:405