MySQL 9.1.0
Source Code Documentation
Recovery_metadata_observer Class Reference

This class is used by: More...

#include <recovery_metadata_observer.h>

Inheritance diagram for Recovery_metadata_observer:
[legend]

Public Member Functions

 Recovery_metadata_observer ()
 Constructor Register observer to get notification on view change. More...
 
virtual ~Recovery_metadata_observer () override
 Destructor. More...
 
- Public Member Functions inherited from Group_event_observer
virtual ~Group_event_observer ()=0
 

Private Member Functions

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) override
 Executed after view install and before primary election. More...
 
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) override
 Executed after primary election. More...
 
int before_message_handling (const Plugin_gcs_message &message, const std::string &message_origin, bool *skip_message) override
 Executed before the message is processed. More...
 

Detailed Description

This class is used by:

  1. joiner: to keep track of all leaving recovery metadata donors, so that joiner can error out if no donor is available.
  2. recovery metadata donors: to keep track of all leaving recovery metadata donors, so that other donor can send metadata if any exisiting donor has left before successfully sending data.

Constructor & Destructor Documentation

◆ Recovery_metadata_observer()

Recovery_metadata_observer::Recovery_metadata_observer ( )

Constructor Register observer to get notification on view change.

◆ ~Recovery_metadata_observer()

Recovery_metadata_observer::~Recovery_metadata_observer ( )
overridevirtual

Destructor.

Unregister observers

Member Function Documentation

◆ after_primary_election()

int Recovery_metadata_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 
)
overrideprivatevirtual

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

Implements Group_event_observer.

◆ after_view_change()

int Recovery_metadata_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 
)
overrideprivatevirtual

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

Implements Group_event_observer.

◆ before_message_handling()

int Recovery_metadata_observer::before_message_handling ( const Plugin_gcs_message message,
const std::string &  message_origin,
bool *  skip_message 
)
overrideprivatevirtual

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

Implements Group_event_observer.


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