24#ifndef MEMBER_ACTIONS_HANDLER_INCLUDED
25#define MEMBER_ACTIONS_HANDLER_INCLUDED
31#include "plugin/group_replication/generated/protobuf_lite/replication_group_member_actions.pb.h"
58 return "AFTER_PRIMARY_ELECTION";
154 bool receive(
const char *tag,
const unsigned char *data,
size_t data_length);
170 const std::string &
event);
186 const std::string &
event);
208 const std::vector<std::string>
209 &exchanged_members_actions_serialized_configuration);
261 const std::string &serialized_configuration)
override;
284 "group_replication_message_service_recv.replication_group_member_"
Interface for configuration propagation through Member_actions_handler.
Definition: configuration_propagation.h:33
The member actions table configuration abstraction layer.
Definition: member_actions_handler_configuration.h:36
Handles member actions configuration and trigger.
Definition: member_actions_handler.h:96
Member_actions_handler()
Definition: member_actions_handler.cc:45
int run_internal_action(const protobuf_replication_group_member_actions::Action &action)
Run a INTERNAL action.
Definition: member_actions_handler.cc:366
bool acquire_send_service()
Acquires a reference to the group_replication_message_service_send service.
Definition: member_actions_handler.cc:100
std::pair< bool, std::string > disable_action(const std::string &name, const std::string &event)
Disable a member action for a given event.
Definition: member_actions_handler.cc:288
std::pair< bool, std::string > enable_action(const std::string &name, const std::string &event)
Enable a member action for a given event.
Definition: member_actions_handler.cc:282
bool release_send_service()
Releases the reference to the group_replication_message_service_send service.
Definition: member_actions_handler.cc:127
bool propagate_serialized_configuration(const std::string &serialized_configuration) override
Propagate the serialized configuration to the group.
Definition: member_actions_handler.cc:261
void run(Mysql_thread_body_parameters *parameters) override
Run the actions that were triggered.
Definition: member_actions_handler.cc:305
bool force_my_actions_configuration_on_all_members()
Propagate the local member actions configuration to the group, enabling the force_update flag,...
Definition: member_actions_handler.cc:250
bool reset_to_default_actions_configuration()
Reset member actions to the default configuration.
Definition: member_actions_handler.cc:171
bool init()
Initialize the handler.
Definition: member_actions_handler.cc:51
Mysql_thread * m_mysql_thread
Single thread executor.
Definition: member_actions_handler.h:295
const char * m_message_service_listener_name
The name of the message service listener.
Definition: member_actions_handler.h:283
virtual ~Member_actions_handler() override
Definition: member_actions_handler.cc:49
mysql_service_group_replication_message_service_send_t * m_group_replication_message_service_send
Pointer to the group_replication_message_service_send service.
Definition: member_actions_handler.h:301
const char * m_message_tag
The tag used on the messages sent by this class.
Definition: member_actions_handler.h:278
bool receive(const char *tag, const unsigned char *data, size_t data_length)
Delivery method for the group_replication_message_service_recv service.
Definition: member_actions_handler.cc:144
bool replace_all_actions(const std::vector< std::string > &exchanged_members_actions_serialized_configuration)
Replace member actions configuration with the given one.
Definition: member_actions_handler.cc:182
void trigger_actions(Member_actions::enum_action_event event)
Trigger the actions configured to run on the given event.
Definition: member_actions_handler.cc:294
Member_actions_handler_configuration * m_configuration
The table configuration abstraction layer.
Definition: member_actions_handler.h:290
bool deinit()
De-initialize the handler.
Definition: member_actions_handler.cc:82
bool get_all_actions(std::string &serialized_configuration)
Retrieve member actions configuration in the serialized format.
Definition: member_actions_handler.cc:243
The event on which a member action is triggered, which will be a trigger parameter.
Definition: member_actions_handler.h:74
Member_actions::enum_action_event get_event()
Definition: member_actions_handler.h:84
Member_actions::enum_action_event m_event
Definition: member_actions_handler.h:87
Member_actions_trigger_parameters(const Member_actions_trigger_parameters &o)
Definition: member_actions_handler.h:79
virtual ~Member_actions_trigger_parameters()
Definition: member_actions_handler.h:82
Member_actions_trigger_parameters(Member_actions::enum_action_event event)
Definition: member_actions_handler.h:76
The list of events on which a member action can be triggered.
Definition: member_actions_handler.h:42
static const std::string get_event_name(enum_action_event event)
Return a string representation of a member action event.
Definition: member_actions_handler.h:55
enum_action_event
Definition: member_actions_handler.h:46
@ AFTER_PRIMARY_ELECTION
Definition: member_actions_handler.h:46
virtual ~Member_actions()
Definition: member_actions_handler.h:44
Interface for Mysql_thread_body parameters.
Definition: mysql_thread.h:39
Interface for Mysql_thread_body, the task of a Mysql_thread.
Definition: mysql_thread.h:108
A generic single thread executor.
Definition: mysql_thread.h:208
message Action
Definition: replication_group_member_actions.proto:30
repeated Action action
Definition: replication_group_member_actions.proto:43
required string event
Definition: replication_group_member_actions.proto:32
#define SERVICE_TYPE_NO_CONST(name)
Generates the standard Service type name.
Definition: service.h:71
case opt name
Definition: sslopt-case.h:29