#include <primary_election_validation_handler.h>
 | 
| enum_primary_validation_result  | validate_group_slave_channels (std::string &uuid) | 
|   | Check which members have slave channels.  More...
  | 
|   | 
| int  | after_view_change (const std::vector< Gcs_member_identifier > &joining, const std::vector< Gcs_member_identifier > &leaving, const std::vector< Gcs_member_identifier > &group, bool is_leaving, bool *skip_election, enum_primary_election_mode *election_mode, std::string &suggested_primary) override | 
|   | Executed after view install and before primary election.  More...
  | 
|   | 
| int  | after_primary_election (std::string primary_uuid, enum_primary_election_primary_change_status primary_change_status, enum_primary_election_mode election_mode, int error) override | 
|   | Executed after primary election.  More...
  | 
|   | 
| int  | before_message_handling (const Plugin_gcs_message &message, const std::string &message_origin, bool *skip_message) override | 
|   | Executed before the message is processed.  More...
  | 
|   | 
◆ enum_primary_validation_result
Enum for the end results of validation. 
| Enumerator | 
|---|
| VALID_PRIMARY  |  | 
| INVALID_PRIMARY  |  | 
| CURRENT_PRIMARY  |  | 
| GROUP_SOLO_PRIMARY  |  | 
 
 
◆ Primary_election_validation_handler()
      
        
          | Primary_election_validation_handler::Primary_election_validation_handler  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ ~Primary_election_validation_handler()
  
  
      
        
          | Primary_election_validation_handler::~Primary_election_validation_handler  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
override   | 
  
 
 
◆ abort_validation_process()
      
        
          | void Primary_election_validation_handler::abort_validation_process  | 
          ( | 
           | ) | 
           | 
        
      
 
Interrupt the validation process in case of an abort. 
 
 
◆ after_primary_election()
Executed after primary election. 
- Parameters
 - 
  
    | primary_uuid | the elected primary  | 
    | primary_change_status | if the primary changed after the election  | 
    | election_mode | what was the election mode  | 
    | error | if there was and error on the process  | 
  
   
Implements Group_event_observer.
 
 
◆ after_view_change()
Executed after view install and before primary election. 
- Parameters
 - 
  
     | joining | members joining the group  | 
     | leaving | members leaving the group  | 
     | group | members in the group  | 
     | is_leaving | is the member leaving  | 
    | [out] | skip_election | skip primary election on view  | 
    | [out] | election_mode | election mode  | 
    | [out] | suggested_primary | what should be the next primary to elect  | 
  
   
Implements Group_event_observer.
 
 
◆ before_message_handling()
  
  
      
        
          | int Primary_election_validation_handler::before_message_handling  | 
          ( | 
          const Plugin_gcs_message &  | 
          message,  | 
         
        
           | 
           | 
          const std::string &  | 
          message_origin,  | 
         
        
           | 
           | 
          bool *  | 
          skip_message  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
overrideprivatevirtual   | 
  
 
Executed before the message is processed. 
- Parameters
 - 
  
     | message | The GCS message  | 
     | message_origin | The member that sent this message (address)  | 
    | [out] | skip_message | skip message handling if true  | 
  
   
Implements Group_event_observer.
 
 
◆ initialize_validation_structures()
      
        
          | bool Primary_election_validation_handler::initialize_validation_structures  | 
          ( | 
           | ) | 
           | 
        
      
 
Initialize the group member structures and registers an observer. 
- Note
 - this method should be called in a GCS logical moment
 
- Returns
 - true if some error happened, false otherwise 
 
 
 
◆ prepare_election()
      
        
          | bool Primary_election_validation_handler::prepare_election  | 
          ( | 
           | ) | 
           | 
        
      
 
Shares information among members about weights and channels in all members. 
 
 
◆ terminates_validation_structures()
      
        
          | void Primary_election_validation_handler::terminates_validation_structures  | 
          ( | 
           | ) | 
           | 
        
      
 
Cleans the membership info, and pending notifications. 
Deregister the observer for group events. 
 
 
◆ validate_election()
Validate group for election. 
- Parameters
 - 
  
    | [in] | uuid | member to validate  | 
    | [out] | valid_uuid | the only member valid for election  | 
    | [out] | error_msg | the error message outputted by validation | 
  
   
- Returns
 - if the primary is valid or what is the solo valid primary 
 
- Return values
 - 
  
    | VALID_PRIMARY | if valid  | 
    | INVALID_PRIMARY | if not valid  | 
    | CURRENT_PRIMARY | if it is already the primary  | 
    | GROUP_SOLO_PRIMARY | only one member is valid  | 
  
   
 
 
◆ validate_group_slave_channels()
Check which members have slave channels. 
 
 
◆ validate_primary_uuid()
Check that the UUID is valid and present in the group. 
- Parameters
 - 
  
  
 
- Return values
 - 
  
    | INVALID_PRIMARY | if not present in the group anymore  | 
    | CURRENT_PRIMARY | if the uuid provided is already the primary  | 
    | VALID_PRIMARY | if the uuid is valid in the group  | 
  
   
 
 
◆ validate_primary_version()
Check that the group members have valid versions. 
- All support appointed elections
 
- The appointed member is from the lowest version present in the group
 
- Parameters
 - 
  
    | [in] | uuid | member to validate  | 
    | [out] | error_msg | the error message outputted by validation  | 
  
   
 
 
◆ group_members_info
  
  
      
        
          | std::map<const std::string, Election_member_info *> Primary_election_validation_handler::group_members_info | 
         
       
   | 
  
private   | 
  
 
The information about the group members <address,member> 
 
 
◆ notification_cond
  
  
      
        
          | mysql_cond_t Primary_election_validation_handler::notification_cond | 
         
       
   | 
  
private   | 
  
 
The condition for notifications. 
 
 
◆ notification_lock
  
  
      
        
          | mysql_mutex_t Primary_election_validation_handler::notification_lock | 
         
       
   | 
  
private   | 
  
 
The lock for notifications. 
 
 
◆ number_of_responses
  
  
      
        
          | uint Primary_election_validation_handler::number_of_responses | 
         
       
   | 
  
private   | 
  
 
The number of members that sent info or left. 
 
 
◆ validation_process_aborted
  
  
      
        
          | bool Primary_election_validation_handler::validation_process_aborted | 
         
       
   | 
  
private   | 
  
 
Was the validation process aborted. 
 
 
The documentation for this class was generated from the following files: