MySQL 9.1.0
Source Code Documentation
Rpl_acf_configuration_handler Class Reference

#include <rpl_async_conn_failover_configuration_propagation.h>

Public Member Functions

 Rpl_acf_configuration_handler ()
 Construction. More...
 
virtual ~Rpl_acf_configuration_handler ()
 Destruction. More...
 
bool init ()
 Initialize and configure group_replication_message_service_recv service so member can receive and process data from group members. More...
 
bool receive (const char *tag, const unsigned char *data, size_t data_length)
 Receive data sent by group replication group member. More...
 
bool send_channel_status_and_version_data (const std::string &channel, Rpl_acf_status_configuration::enum_key key, int status)
 Send variable status to its group replication group members. More...
 
void delete_channel_status (const std::string &channel, Rpl_acf_status_configuration::enum_key key)
 Delete channel status. More...
 
bool send_table_data (Rpl_sys_table_access &table_op)
 Get stored data in mysql.replication_asynchronous_connection_failover or mysql.replication_asynchronous_connection_failover_managed table and send to its group replication group members. More...
 
bool send_failover_data (Rpl_sys_table_access &table_op)
 Get stored data in mysql.replication_asynchronous_connection_failover table and send to its group replication group members. More...
 
void reload_failover_channels_status ()
 Reload the failover channel status from runtime information. More...
 
bool get_configuration (std::string &serialized_configuration)
 Get data stored in mysql.replication_asynchronous_connection_failover or mysql.replication_asynchronous_connection_failover_managed table in protobuf serialized string format. More...
 
bool set_configuration (const std::vector< std::string > &exchanged_replication_failover_channels_serialized_configuration)
 Save data in mysql.replication_asynchronous_connection_failover or mysql.replication_asynchronous_connection_failover_managed table. More...
 
bool force_my_replication_failover_channels_configuration_on_all_members ()
 Collect and broadcast the replication failover channels configuration in a serialized protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList message, that will override the configuration on all group members. More...
 

Private Member Functions

bool deinit ()
 Unregister group_replication_message_service_recv service. More...
 
bool receive_failover (const unsigned char *data, size_t data_length)
 Receive mysql.replication_asynchronous_connection_failover table data sent by group replication group member. More...
 
bool receive_managed (const unsigned char *data, size_t data_length)
 Receive mysql.replication_asynchronous_connection_failover_managed table data sent by group replication group member. More...
 
bool receive_channel_status (const unsigned char *data, size_t data_length)
 Receive SOURCE_CONNECTION_AUTO_FAILOVER value of CHANGE REPLICATION SOURCE command data sent by group replication group member. More...
 
bool receive_failover_and_managed_and_status (const unsigned char *data, size_t data_length)
 Receive mysql.replication_asynchronous_connection_failover and mysql.replication_asynchronous_connection_failover_managed table data sent by group replication group member. More...
 
bool send (const char *tag, const char *data, size_t data_length)
 Send data to all group replication group members. More...
 
bool send_failover (const char *data, size_t data_length)
 Send mysql.replication_asynchronous_connection_failover table data to group replication group members. More...
 
bool send_managed (const char *data, size_t data_length)
 Send mysql.replication_asynchronous_connection_failover_managed table data to group replication group members. More...
 
bool send_managed_data (Rpl_sys_table_access &table_op)
 Get stored data in mysql.replication_asynchronous_connection_failover_managed table and send to its group replication group members. More...
 
bool send_channel_status (const char *data, size_t data_length)
 Send SOURCE_CONNECTION_AUTO_FAILOVER value of CHANGE REPLICATION SOURCE command data to group replication group members. More...
 
bool set_failover_sources_internal (const protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList &configuration)
 Save data in mysql.replication_asynchronous_connection_failover table. More...
 
bool set_failover_managed_internal (const protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList &configuration)
 Save data in mysql.replication_asynchronous_connection_failover_managed table. More...
 

Private Attributes

const std::vector< std::string > m_message_tag
 
const std::string m_db {"mysql"}
 
const std::string m_table_failover
 
const uint m_table_failover_num_field {6}
 
const std::string m_table_managed
 
const uint m_table_managed_num_field {4}
 
Rpl_acf_status_configuration m_rpl_failover_channels_status
 

Constructor & Destructor Documentation

◆ Rpl_acf_configuration_handler()

Rpl_acf_configuration_handler::Rpl_acf_configuration_handler ( )

Construction.

◆ ~Rpl_acf_configuration_handler()

Rpl_acf_configuration_handler::~Rpl_acf_configuration_handler ( )
virtual

Destruction.

Member Function Documentation

◆ deinit()

bool Rpl_acf_configuration_handler::deinit ( )
private

Unregister group_replication_message_service_recv service.

Returns
function return value which determines if was: false Successful true Error

◆ delete_channel_status()

void Rpl_acf_configuration_handler::delete_channel_status ( const std::string &  channel,
Rpl_acf_status_configuration::enum_key  key 
)

Delete channel status.

Parameters
[in]channelthe channel name.
[in]keythe variable whose status to be send.

◆ force_my_replication_failover_channels_configuration_on_all_members()

bool Rpl_acf_configuration_handler::force_my_replication_failover_channels_configuration_on_all_members ( )

Collect and broadcast the replication failover channels configuration in a serialized protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList message, that will override the configuration on all group members.

Returns
the operation status
Return values
falseOK
trueError

◆ get_configuration()

bool Rpl_acf_configuration_handler::get_configuration ( std::string &  serialized_configuration)

Get data stored in mysql.replication_asynchronous_connection_failover or mysql.replication_asynchronous_connection_failover_managed table in protobuf serialized string format.

Parameters
[out]serialized_configurationsave in protobuf serialized string format.
Returns
function return value which determines: false Successful true Error

◆ init()

bool Rpl_acf_configuration_handler::init ( )

Initialize and configure group_replication_message_service_recv service so member can receive and process data from group members.

Returns
function return value which determines if was: false Successful true Error

◆ receive()

bool Rpl_acf_configuration_handler::receive ( const char *  tag,
const unsigned char *  data,
size_t  data_length 
)

Receive data sent by group replication group member.

Parameters
[in]tagidentifier which determine type of data received.
[in]datadata received.
[in]data_lengthsize of data received.
Returns
function return value which determines if read was: false Successful true Error

◆ receive_channel_status()

bool Rpl_acf_configuration_handler::receive_channel_status ( const unsigned char *  data,
size_t  data_length 
)
private

Receive SOURCE_CONNECTION_AUTO_FAILOVER value of CHANGE REPLICATION SOURCE command data sent by group replication group member.

Parameters
[in]datadata received.
[in]data_lengthsize of data received.
Returns
function return value which determines if read was: false Successful true Error

◆ receive_failover()

bool Rpl_acf_configuration_handler::receive_failover ( const unsigned char *  data,
size_t  data_length 
)
private

Receive mysql.replication_asynchronous_connection_failover table data sent by group replication group member.

Parameters
[in]datadata received.
[in]data_lengthsize of data received.
Returns
function return value which determines if read was: false Successful true Error

◆ receive_failover_and_managed_and_status()

bool Rpl_acf_configuration_handler::receive_failover_and_managed_and_status ( const unsigned char *  data,
size_t  data_length 
)
private

Receive mysql.replication_asynchronous_connection_failover and mysql.replication_asynchronous_connection_failover_managed table data sent by group replication group member.

Parameters
[in]datadata received.
[in]data_lengthsize of data received.
Returns
function return value which determines if read was: false Successful true Error

◆ receive_managed()

bool Rpl_acf_configuration_handler::receive_managed ( const unsigned char *  data,
size_t  data_length 
)
private

Receive mysql.replication_asynchronous_connection_failover_managed table data sent by group replication group member.

Parameters
[in]datadata received.
[in]data_lengthsize of data received.
Returns
function return value which determines if read was: false Successful true Error

◆ reload_failover_channels_status()

void Rpl_acf_configuration_handler::reload_failover_channels_status ( )

Reload the failover channel status from runtime information.

◆ send()

bool Rpl_acf_configuration_handler::send ( const char *  tag,
const char *  data,
size_t  data_length 
)
private

Send data to all group replication group members.

Parameters
[in]tagidentifier which determine type of data.
[in]datadata to be send
[in]data_lengthsize of data to be send.
Returns
function return value which determines if read was: false Successful true Error

◆ send_channel_status()

bool Rpl_acf_configuration_handler::send_channel_status ( const char *  data,
size_t  data_length 
)
private

Send SOURCE_CONNECTION_AUTO_FAILOVER value of CHANGE REPLICATION SOURCE command data to group replication group members.

Parameters
[in]datadata to be send
[in]data_lengthsize of data to be send.
Returns
function return value which determines if read was: false Successful true Error

◆ send_channel_status_and_version_data()

bool Rpl_acf_configuration_handler::send_channel_status_and_version_data ( const std::string &  channel,
Rpl_acf_status_configuration::enum_key  key,
int  status 
)

Send variable status to its group replication group members.

Parameters
[in]channelthe channel name.
[in]keythe variable whose status to be send.
[in]statusthe variable status to be send.
Returns
function return value which determines: false Successful true Error

◆ send_failover()

bool Rpl_acf_configuration_handler::send_failover ( const char *  data,
size_t  data_length 
)
private

Send mysql.replication_asynchronous_connection_failover table data to group replication group members.

Parameters
[in]datadata to be send
[in]data_lengthsize of data to be send.
Returns
function return value which determines if read was: false Successful true Error

◆ send_failover_data()

bool Rpl_acf_configuration_handler::send_failover_data ( Rpl_sys_table_access table_op)

Get stored data in mysql.replication_asynchronous_connection_failover table and send to its group replication group members.

Parameters
[in]table_opRpl_sys_table_access class object.
Returns
function return value which determines: false Successful true Error

◆ send_managed()

bool Rpl_acf_configuration_handler::send_managed ( const char *  data,
size_t  data_length 
)
private

Send mysql.replication_asynchronous_connection_failover_managed table data to group replication group members.

Parameters
[in]datadata to be send
[in]data_lengthsize of data to be send.
Returns
function return value which determines if read was: false Successful true Error

◆ send_managed_data()

bool Rpl_acf_configuration_handler::send_managed_data ( Rpl_sys_table_access table_op)
private

Get stored data in mysql.replication_asynchronous_connection_failover_managed table and send to its group replication group members.

Parameters
[in]table_opRpl_sys_table_access class object.
Returns
function return value which determines: false Successful true Error

◆ send_table_data()

bool Rpl_acf_configuration_handler::send_table_data ( Rpl_sys_table_access table_op)

Get stored data in mysql.replication_asynchronous_connection_failover or mysql.replication_asynchronous_connection_failover_managed table and send to its group replication group members.

Parameters
[in]table_opRpl_sys_table_access class object.
Returns
function return value which determines: false Successful true Error

◆ set_configuration()

bool Rpl_acf_configuration_handler::set_configuration ( const std::vector< std::string > &  exchanged_replication_failover_channels_serialized_configuration)

Save data in mysql.replication_asynchronous_connection_failover or mysql.replication_asynchronous_connection_failover_managed table.

Parameters
[in]exchanged_replication_failover_channels_serialized_configurationsave data from serialized string format.
Returns
function return value which determines: false Successful true Error

◆ set_failover_managed_internal()

bool Rpl_acf_configuration_handler::set_failover_managed_internal ( const protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList configuration)
private

Save data in mysql.replication_asynchronous_connection_failover_managed table.

Parameters
[in]configurationthe configuration in protobuf
Returns
function return value which determines: false Successful true Error

◆ set_failover_sources_internal()

bool Rpl_acf_configuration_handler::set_failover_sources_internal ( const protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList configuration)
private

Save data in mysql.replication_asynchronous_connection_failover table.

Parameters
[in]configurationthe configuration in protobuf
Returns
function return value which determines: false Successful true Error

Member Data Documentation

◆ m_db

const std::string Rpl_acf_configuration_handler::m_db {"mysql"}
private

◆ m_message_tag

const std::vector<std::string> Rpl_acf_configuration_handler::m_message_tag
private
Initial value:
{
"mysql_replication_asynchronous_connection_failover",
"mysql_replication_asynchronous_connection_managed",
"mysql_replication_asynchronous_connection_variable_status",
"mysql_replication_asynchronous_connection_failover_and_managed_and_"
"status"}

◆ m_rpl_failover_channels_status

Rpl_acf_status_configuration Rpl_acf_configuration_handler::m_rpl_failover_channels_status
private

◆ m_table_failover

const std::string Rpl_acf_configuration_handler::m_table_failover
private
Initial value:
{
"replication_asynchronous_connection_failover"}

◆ m_table_failover_num_field

const uint Rpl_acf_configuration_handler::m_table_failover_num_field {6}
private

◆ m_table_managed

const std::string Rpl_acf_configuration_handler::m_table_managed
private
Initial value:
{
"replication_asynchronous_connection_failover_managed"}

◆ m_table_managed_num_field

const uint Rpl_acf_configuration_handler::m_table_managed_num_field {4}
private

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