MySQL 8.0.40
Source Code Documentation
Gcs_xcom_notification Class Referenceabstract

Abstract class that defines a notification that will be sent from XCOM to MySQL GCS or from an user thread to MySQL GCS. More...

#include <gcs_xcom_notification.h>

Inheritance diagram for Gcs_xcom_notification:
[legend]

Public Member Functions

 Gcs_xcom_notification ()=default
 Constructor for Gcs_xcom_notification which an abstract class that represents notifications sent from XCOM to MySQL GCS. More...
 
virtual bool operator() ()=0
 Task implemented by this notification which calls do_execute. More...
 
virtual ~Gcs_xcom_notification ()=default
 Destructor for the Gcs_xcom_notification. More...
 

Private Member Functions

 Gcs_xcom_notification (Gcs_xcom_notification const &)
 
Gcs_xcom_notificationoperator= (Gcs_xcom_notification const &)
 

Detailed Description

Abstract class that defines a notification that will be sent from XCOM to MySQL GCS or from an user thread to MySQL GCS.

This is a very simple implementation that chooses simplicity over flexibility. For example, it does not support notifications on member functions (i.e. methods) and a new notification generates some duplicated code. Note that these limitations could be eliminated with the use of generalized functors. However, this solution would have increased code complexity as we cannot use C++ 11.

Note also that we have used the term functor here to designed the pointer to the callback function.

We will revisit this decision in the future if any of the choices become a problem and when we start using C++ 11.

Constructor & Destructor Documentation

◆ Gcs_xcom_notification() [1/2]

Gcs_xcom_notification::Gcs_xcom_notification ( )
explicitdefault

Constructor for Gcs_xcom_notification which an abstract class that represents notifications sent from XCOM to MySQL GCS.

Such notifications are read from a queue by a MySQL GCS' thread, specifically by the Gcs_xcom_engine which is responsible for executing them.

The main loop in the GCS_xcom_engine is stopped when the execution returns true.

◆ ~Gcs_xcom_notification()

virtual Gcs_xcom_notification::~Gcs_xcom_notification ( )
virtualdefault

Destructor for the Gcs_xcom_notification.

◆ Gcs_xcom_notification() [2/2]

Gcs_xcom_notification::Gcs_xcom_notification ( Gcs_xcom_notification const &  )
private

Member Function Documentation

◆ operator()()

virtual bool Gcs_xcom_notification::operator() ( )
pure virtual

Task implemented by this notification which calls do_execute.

Implemented in Parameterized_notification< stop >, Parameterized_notification< false >, and Parameterized_notification< true >.

◆ operator=()

Gcs_xcom_notification & Gcs_xcom_notification::operator= ( Gcs_xcom_notification const &  )
private

The documentation for this class was generated from the following file: