MySQL 9.1.0
Source Code Documentation
|
The member actions table configuration abstraction layer. More...
#include <member_actions_handler_configuration.h>
Public Member Functions | |
Member_actions_handler_configuration (Configuration_propagation *configuration_propagation) | |
Constructor. More... | |
virtual | ~Member_actions_handler_configuration () |
std::pair< bool, std::string > | enable_disable_action (const std::string &name, const std::string &event, bool enable) |
Enable/disable a member action. More... | |
bool | get_actions_for_event (protobuf_replication_group_member_actions::ActionList &action_list, const std::string &event) |
Retrieve member actions configured to trigger on a given event. More... | |
bool | get_all_actions (std::string &serialized_configuration, bool set_force_update) |
Retrieve member actions configuration in the serialized format. More... | |
bool | update_all_actions (const protobuf_replication_group_member_actions::ActionList &action_list) |
Update member actions configuration with a given configuration. More... | |
bool | replace_all_actions (const protobuf_replication_group_member_actions::ActionList &action_list) |
Replace member actions configuration with a given configuration, even if the given configuration has a version lower than the local configuration. More... | |
bool | reset_to_default_actions_configuration () |
Reset member actions to the default configuration. More... | |
Private Member Functions | |
void | field_store (Field *field, const std::string &value) |
void | field_store (Field *field, uint value) |
std::pair< bool, std::string > | commit_and_propagate_changes (Rpl_sys_table_access &table_op) |
Commit and propagate the local member actions configuration. More... | |
bool | get_all_actions_internal (Rpl_sys_table_access &table_op, protobuf_replication_group_member_actions::ActionList &action_list) |
Retrieve member actions configuration in the serialized format. More... | |
bool | update_all_actions_internal (const protobuf_replication_group_member_actions::ActionList &action_list, bool ignore_version, bool ignore_global_read_lock) |
Update member actions configuration with a given configuration. More... | |
Private Attributes | |
const std::string | s_schema_name {"mysql"} |
const std::string | s_table_name {"replication_group_member_actions"} |
const uint | s_fields_number {6} |
Configuration_propagation * | m_configuration_propagation {nullptr} |
The pointer to the object to call to propagate configuration. More... | |
The member actions table configuration abstraction layer.
Member_actions_handler_configuration::Member_actions_handler_configuration | ( | Configuration_propagation * | configuration_propagation | ) |
Constructor.
[in] | configuration_propagation | the object to call to propagate configuration |
|
virtual |
|
private |
Commit and propagate the local member actions configuration.
[in] | table_op | the table that persists the configuration |
false | Successful |
true | Error |
std::pair< bool, std::string > Member_actions_handler_configuration::enable_disable_action | ( | const std::string & | name, |
const std::string & | event, | ||
bool | enable | ||
) |
Enable/disable a member action.
[in] | name | the action name |
[in] | event | the action event |
[in] | enable | true to enable the action, false to disable |
|
private |
|
private |
bool Member_actions_handler_configuration::get_actions_for_event | ( | protobuf_replication_group_member_actions::ActionList & | action_list, |
const std::string & | event | ||
) |
Retrieve member actions configured to trigger on a given event.
[out] | action_list | member actions list |
[in] | event | the event to filter the actions |
false | Successful |
true | Error |
bool Member_actions_handler_configuration::get_all_actions | ( | std::string & | serialized_configuration, |
bool | set_force_update | ||
) |
Retrieve member actions configuration in the serialized format.
[out] | serialized_configuration | the serialized configuration |
[in] | set_force_update | if true enables the force_update flag, which will make the sent configuration to override other members configuration |
false | Successful |
true | Error |
|
private |
Retrieve member actions configuration in the serialized format.
[in] | table_op | the table that persists the configuration |
[out] | action_list | member actions list |
false | Successful |
true | Error |
bool Member_actions_handler_configuration::replace_all_actions | ( | const protobuf_replication_group_member_actions::ActionList & | action_list | ) |
Replace member actions configuration with a given configuration, even if the given configuration has a version lower than the local configuration.
[in] | action_list | member actions list |
false | Successful |
true | Error |
bool Member_actions_handler_configuration::reset_to_default_actions_configuration | ( | ) |
Reset member actions to the default configuration.
false | Successful |
true | Error |
bool Member_actions_handler_configuration::update_all_actions | ( | const protobuf_replication_group_member_actions::ActionList & | action_list | ) |
Update member actions configuration with a given configuration.
If the given configuration has a version lower than the local configuration, the update is skipped.
[in] | action_list | member actions list |
false | Successful |
true | Error |
|
private |
Update member actions configuration with a given configuration.
If the given configuration has a version lower than the local configuration, the update is skipped.
[in] | action_list | member actions list |
[in] | ignore_version | if false, the local configuration is updated if the version of the given configuration is higher than the local one true, there is no version checking |
[in] | ignore_global_read_lock | if true, global_read_lock is ignored on commit false, otherwise |
false | Successful |
true | Error |
|
private |
The pointer to the object to call to propagate configuration.
|
private |
|
private |
|
private |