MySQL 8.0.40
Source Code Documentation
Rpl_acf_status_configuration Class Reference

Memory storage of the replication failover channel status configuration propagated to Group Replication members. More...

#include <rpl_async_conn_failover_configuration_propagation.h>

Public Types

enum  enum_key { SOURCE_CONNECTION_AUTO_FAILOVER = 0 }
 Status keys propagated with the group. More...
 

Public Member Functions

 Rpl_acf_status_configuration ()
 
virtual ~Rpl_acf_status_configuration ()
 
bool reset ()
 Clears the status configuration. More...
 
void reload ()
 Reloads the status configuration from runtime information. More...
 
void delete_channel_status (const std::string &channel, Rpl_acf_status_configuration::enum_key key)
 Delete the status configuration value. More...
 
void set_value_and_increment_version (const std::string &channel, Rpl_acf_status_configuration::enum_key key, int value, protobuf_replication_asynchronous_connection_failover::VariableStatusList &configuration)
 Sets the status configuration value and increment version value. More...
 
bool set (const protobuf_replication_asynchronous_connection_failover::VariableStatusList &configuration)
 Sets the status configuration with the one received from the group. More...
 
bool set (const protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList &configuration)
 Sets the status configuration with the one received from the group. More...
 
void get (protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList &configuration)
 Gets the status configuration to send to the group. More...
 

Static Private Member Functions

static std::string get_key_name (Rpl_acf_status_configuration::enum_key key)
 

Private Attributes

mysql_mutex_t m_lock
 
ulonglong m_version {0}
 
std::map< std::pair< std::string, std::string >, int > m_status
 

Static Private Attributes

static const std::vector< std::string > m_key_names
 

Detailed Description

Memory storage of the replication failover channel status configuration propagated to Group Replication members.

Member Enumeration Documentation

◆ enum_key

Status keys propagated with the group.

Enumerator
SOURCE_CONNECTION_AUTO_FAILOVER 

Constructor & Destructor Documentation

◆ Rpl_acf_status_configuration()

Rpl_acf_status_configuration::Rpl_acf_status_configuration ( )

◆ ~Rpl_acf_status_configuration()

Rpl_acf_status_configuration::~Rpl_acf_status_configuration ( )
virtual

Member Function Documentation

◆ delete_channel_status()

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

Delete the status configuration value.

Parameters
[in]channelthe channel name.
[in]keythe variable whose status to set and increment version.

◆ get()

void Rpl_acf_status_configuration::get ( protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList configuration)

Gets the status configuration to send to the group.

Parameters
[out]configurationthe configuration in protobuf

◆ get_key_name()

std::string Rpl_acf_status_configuration::get_key_name ( Rpl_acf_status_configuration::enum_key  key)
staticprivate

◆ reload()

void Rpl_acf_status_configuration::reload ( )

Reloads the status configuration from runtime information.

◆ reset()

bool Rpl_acf_status_configuration::reset ( void  )

Clears the status configuration.

Returns
function return value which determines: false Successful true Error

◆ set() [1/2]

bool Rpl_acf_status_configuration::set ( const protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList configuration)

Sets the status configuration with the one received from the group.

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

◆ set() [2/2]

bool Rpl_acf_status_configuration::set ( const protobuf_replication_asynchronous_connection_failover::VariableStatusList configuration)

Sets the status configuration with the one received from the group.

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

◆ set_value_and_increment_version()

void Rpl_acf_status_configuration::set_value_and_increment_version ( const std::string &  channel,
Rpl_acf_status_configuration::enum_key  key,
int  value,
protobuf_replication_asynchronous_connection_failover::VariableStatusList configuration 
)

Sets the status configuration value and increment version value.

Parameters
[in]channelthe channel name.
[in]keythe variable whose status to set and increment version.
[in]valuethe variable status value to set.
[in]configurationthe configuration in protobuf

Member Data Documentation

◆ m_key_names

const std::vector< std::string > Rpl_acf_status_configuration::m_key_names
staticprivate
Initial value:
{
"SOURCE_CONNECTION_AUTO_FAILOVER"}

◆ m_lock

mysql_mutex_t Rpl_acf_status_configuration::m_lock
private

◆ m_status

std::map<std::pair<std::string, std::string>, int> Rpl_acf_status_configuration::m_status
private

◆ m_version

ulonglong Rpl_acf_status_configuration::m_version {0}
private

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