MySQL 8.4.2
Source Code Documentation
Group_event_observer Class Referenceabstract

Class that others can extend to receive notifications about views and primary elections. More...

#include <group_event_observer.h>

Inheritance diagram for Group_event_observer:
[legend]

Public Member Functions

virtual ~Group_event_observer ()=0
 
virtual int after_view_change (const std::vector< Gcs_member_identifier > &joining, const std::vector< Gcs_member_identifier > &leaving, const std::vector< Gcs_member_identifier > &group, bool is_leaving, bool *skip_election, enum_primary_election_mode *election_mode, std::string &suggested_primary)=0
 Executed after view install and before primary election. More...
 
virtual int after_primary_election (std::string primary_uuid, enum_primary_election_primary_change_status primary_change_status, enum_primary_election_mode election_mode, int error)=0
 Executed after primary election. More...
 
virtual int before_message_handling (const Plugin_gcs_message &message, const std::string &message_origin, bool *skip_message)=0
 Executed before the message is processed. More...
 

Detailed Description

Class that others can extend to receive notifications about views and primary elections.

Constructor & Destructor Documentation

◆ ~Group_event_observer()

Group_event_observer::~Group_event_observer ( )
pure virtualdefault

Member Function Documentation

◆ after_primary_election()

virtual int Group_event_observer::after_primary_election ( std::string  primary_uuid,
enum_primary_election_primary_change_status  primary_change_status,
enum_primary_election_mode  election_mode,
int  error 
)
pure virtual

Executed after primary election.

Parameters
primary_uuidthe elected primary
primary_change_statusif the primary changed after the election
election_modewhat was the election mode
errorif there was and error on the process

Implemented in Group_action_coordinator, Multi_primary_migration_action, Primary_election_action, Consensus_leaders_handler, Primary_election_primary_process, Primary_election_secondary_process, Primary_election_validation_handler, Remote_clone_handler, and Recovery_metadata_observer.

◆ after_view_change()

virtual int Group_event_observer::after_view_change ( const std::vector< Gcs_member_identifier > &  joining,
const std::vector< Gcs_member_identifier > &  leaving,
const std::vector< Gcs_member_identifier > &  group,
bool  is_leaving,
bool *  skip_election,
enum_primary_election_mode election_mode,
std::string &  suggested_primary 
)
pure virtual

Executed after view install and before primary election.

Parameters
joiningmembers joining the group
leavingmembers leaving the group
groupmembers in the group
is_leavingis the member leaving
[out]skip_electionskip primary election on view
[out]election_modeelection mode
[out]suggested_primarywhat should be the next primary to elect

Implemented in Group_action_coordinator, Multi_primary_migration_action, Primary_election_action, Consensus_leaders_handler, Primary_election_primary_process, Primary_election_secondary_process, Primary_election_validation_handler, Remote_clone_handler, and Recovery_metadata_observer.

◆ before_message_handling()

virtual int Group_event_observer::before_message_handling ( const Plugin_gcs_message message,
const std::string &  message_origin,
bool *  skip_message 
)
pure virtual

Executed before the message is processed.

Parameters
messageThe GCS message
message_originThe member that sent this message (address)
[out]skip_messageskip message handling if true

Implemented in Group_action_coordinator, Multi_primary_migration_action, Primary_election_action, Consensus_leaders_handler, Primary_election_primary_process, Primary_election_secondary_process, Primary_election_validation_handler, Remote_clone_handler, and Recovery_metadata_observer.


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