MySQL 8.0.39
Source Code Documentation
Group_action Class Referenceabstract

The parent class for group wide operations. More...

#include <group_action.h>

Inheritance diagram for Group_action:
[legend]

Public Types

enum  enum_action_execution_result {
  GROUP_ACTION_RESULT_TERMINATED = 0 , GROUP_ACTION_RESULT_ERROR = 1 , GROUP_ACTION_RESULT_RESTART = 2 , GROUP_ACTION_RESULT_ABORTED = 3 ,
  GROUP_ACTION_RESULT_KILLED = 4 , GROUP_ACTION_RESULT_END = 5
}
 Enum for the end results of a action execution. More...
 

Public Member Functions

virtual ~Group_action ()=0
 
virtual void get_action_message (Group_action_message **message)=0
 Get the message with parameters to this action. More...
 
virtual int process_action_message (Group_action_message &message, const std::string &message_origin)=0
 
virtual enum_action_execution_result execute_action (bool invoking_member, Plugin_stage_monitor_handler *stage_handler, Notification_context *)=0
 Execute the action. More...
 
virtual bool stop_action_execution (bool killed)=0
 
virtual Group_action_diagnosticsget_execution_info ()=0
 Gets the info about execution, be it success or failure. More...
 
virtual PSI_stage_key get_action_stage_termination_key ()
 For this action, what is the PSI key for the last stage when the action is terminating. More...
 

Detailed Description

The parent class for group wide operations.

Member Enumeration Documentation

◆ enum_action_execution_result

Enum for the end results of a action execution.

Enumerator
GROUP_ACTION_RESULT_TERMINATED 
GROUP_ACTION_RESULT_ERROR 
GROUP_ACTION_RESULT_RESTART 
GROUP_ACTION_RESULT_ABORTED 
GROUP_ACTION_RESULT_KILLED 
GROUP_ACTION_RESULT_END 

Constructor & Destructor Documentation

◆ ~Group_action()

Group_action::~Group_action ( )
pure virtualdefault

Member Function Documentation

◆ execute_action()

virtual enum_action_execution_result Group_action::execute_action ( bool  invoking_member,
Plugin_stage_monitor_handler stage_handler,
Notification_context  
)
pure virtual

Execute the action.

Parameters
invoking_memberis the member that invoked it
stage_handlerthe stage handler to report progress
Returns
the execution result

Implemented in Communication_protocol_action, Primary_election_action, and Multi_primary_migration_action.

◆ get_action_message()

virtual void Group_action::get_action_message ( Group_action_message **  message)
pure virtual

Get the message with parameters to this action.

Parameters
[out]messagethe message to start the action

Implemented in Communication_protocol_action, Multi_primary_migration_action, and Primary_election_action.

◆ get_action_stage_termination_key()

PSI_stage_key Group_action::get_action_stage_termination_key ( )
virtual

For this action, what is the PSI key for the last stage when the action is terminating.

Note
if not implemented this method will return an invalid key that will make the PFS stage mechanism to never start any stage.
Returns
The stage key, -1 if the method is not implemented by the class

Reimplemented in Multi_primary_migration_action, and Primary_election_action.

◆ get_execution_info()

virtual Group_action_diagnostics * Group_action::get_execution_info ( )
pure virtual

Gets the info about execution, be it success or failure.

Returns
the execution diagnostics object that was the message and its level

Implemented in Communication_protocol_action, Multi_primary_migration_action, and Primary_election_action.

◆ process_action_message()

virtual int Group_action::process_action_message ( Group_action_message message,
const std::string &  message_origin 
)
pure virtual

◆ stop_action_execution()

virtual bool Group_action::stop_action_execution ( bool  killed)
pure virtual

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