MySQL 8.0.39
Source Code Documentation
Gcs_control_event_listener Class Referenceabstract

This interface is implemented by those who wish to receive Control Interface notifications. More...

#include <gcs_control_event_listener.h>

Inheritance diagram for Gcs_control_event_listener:
[legend]

Public Member Functions

virtual void on_view_changed (const Gcs_view &new_view, const Exchanged_data &exchanged_data) const =0
 This method is called when the view is ready to be installed. More...
 
virtual Gcs_message_dataget_exchangeable_data () const =0
 This method is called when the Data Exchange is about to happen in order for the client to provide which data it wants to exchange with the group. More...
 
virtual void on_suspicions (const std::vector< Gcs_member_identifier > &members, const std::vector< Gcs_member_identifier > &unreachable) const =0
 This member function is called when the set of suspicions has changed in the underlying communication infrastructure. More...
 
virtual ~Gcs_control_event_listener ()=default
 

Detailed Description

This interface is implemented by those who wish to receive Control Interface notifications.

Currently, it informs about View Changes, delivering the underlying installed view.

For a working example, please refer to the documentation in Gcs_communication_interface.

Constructor & Destructor Documentation

◆ ~Gcs_control_event_listener()

virtual Gcs_control_event_listener::~Gcs_control_event_listener ( )
virtualdefault

Member Function Documentation

◆ get_exchangeable_data()

virtual Gcs_message_data * Gcs_control_event_listener::get_exchangeable_data ( ) const
pure virtual

This method is called when the Data Exchange is about to happen in order for the client to provide which data it wants to exchange with the group.

Returns
a reference to the exchangeable data. This is a pointer that must be deallocated by the caller, so please provide always a copy of the data to exchange.

Implemented in Plugin_gcs_events_handler.

◆ on_suspicions()

virtual void Gcs_control_event_listener::on_suspicions ( const std::vector< Gcs_member_identifier > &  members,
const std::vector< Gcs_member_identifier > &  unreachable 
) const
pure virtual

This member function is called when the set of suspicions has changed in the underlying communication infrastructure.

Parameters
[in]membersContains the list of all members that are in the current view.
[in]unreachableContains the list of members that are unreachable in the current view, i.e., a subset of members.

Implemented in Plugin_gcs_events_handler.

◆ on_view_changed()

virtual void Gcs_control_event_listener::on_view_changed ( const Gcs_view new_view,
const Exchanged_data exchanged_data 
) const
pure virtual

This method is called when the view is ready to be installed.

The contents of Exchanged_data will be released by MySQL GCS after this handler finishes. Therefore the application MUST copy the contents of exchanged_data if it needs it at a later stage.

Parameters
[in]new_viewa reference to the new view.
[in]exchanged_datathe data handed out by other members.

Implemented in Plugin_gcs_events_handler.


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