MySQL 8.0.39
Source Code Documentation
Group_member_info_manager_interface Class Referenceabstract

#include <member_info.h>

Inheritance diagram for Group_member_info_manager_interface:
[legend]

Public Member Functions

virtual ~Group_member_info_manager_interface ()=default
 
virtual size_t get_number_of_members ()=0
 Number of members in the group. More...
 
virtual size_t get_number_of_members_online ()=0
 Number of ONLINE members in the group. More...
 
virtual bool is_member_info_present (const std::string &uuid)=0
 Is the member present in the group info. More...
 
virtual bool get_group_member_info (const std::string &uuid, Group_member_info &member_info_arg)=0
 Retrieves a registered Group member by its uuid. More...
 
virtual bool get_group_member_info_by_index (int idx, Group_member_info &member_info_arg)=0
 Retrieves a registered Group member by an index function. More...
 
virtual Member_version get_group_lowest_online_version ()=0
 Return lowest member version. More...
 
virtual bool get_group_member_info_by_member_id (const Gcs_member_identifier &id, Group_member_info &member_info_arg)=0
 Retrieves a registered Group member by its backbone GCS identifier. More...
 
virtual Group_member_info::Group_member_status get_group_member_status_by_member_id (const Gcs_member_identifier &id)=0
 Return the status of the member with the given GCS identifier. More...
 
virtual Group_member_info_listget_all_members ()=0
 Retrieves all Group members managed by this site. More...
 
virtual std::list< Gcs_member_identifier > * get_online_members_with_guarantees (const Gcs_member_identifier &exclude_member)=0
 Retrieves all ONLINE Group members managed by this site, or NULL if any group member version is from a version lower than TRANSACTION_WITH_GUARANTEES_VERSION. More...
 
virtual void add (Group_member_info *new_member)=0
 Adds a new member to be managed by this Group manager. More...
 
virtual void update (Group_member_info *update_local_member)=0
 Removes all members of the group and update new local member. More...
 
virtual void update (Group_member_info_list *new_members)=0
 Updates all members of the group. More...
 
virtual void update_member_status (const std::string &uuid, Group_member_info::Group_member_status new_status, Notification_context &ctx)=0
 Updates the status of a single member. More...
 
virtual void set_member_unreachable (const std::string &uuid)=0
 Sets the identified member as unreachable. More...
 
virtual void set_member_reachable (const std::string &uuid)=0
 Sets the identified member as reachable. More...
 
virtual void update_gtid_sets (const std::string &uuid, std::string &gtid_executed, std::string &purged_gtids, std::string &gtid_retrieved)=0
 Updates the GTID sets on a single member. More...
 
virtual void update_member_role (const std::string &uuid, Group_member_info::Group_member_role new_role, Notification_context &ctx)=0
 Updates the role of a single member. More...
 
virtual void update_group_primary_roles (const std::string &uuid, Notification_context &ctx)=0
 Updates the primary/secondary roles of the group. More...
 
virtual void update_member_weight (const std::string &uuid, uint member_weight)=0
 Updates the weight of a single member. More...
 
virtual void update_primary_member_flag (bool in_primary_mode)=0
 Changes the primary flag on all members. More...
 
virtual void update_enforce_everywhere_checks_flag (bool enforce_everywhere)=0
 Set the enforces_update_everywhere_checks flag on all members. More...
 
virtual void encode (std::vector< uchar > *to_encode)=0
 Encodes this object to send via the network. More...
 
virtual Group_member_info_listdecode (const uchar *to_decode, size_t length)=0
 Decodes the raw format of this object. More...
 
virtual bool is_conflict_detection_enabled ()=0
 Check if some member of the group has the conflict detection enable. More...
 
virtual bool get_primary_member_uuid (std::string &primary_member_uuid)=0
 Return the uuid for the for the primary. More...
 
virtual bool get_primary_member_info (Group_member_info &member_info_arg)=0
 Return the group member info for the current group primary. More...
 
virtual bool is_majority_unreachable ()=0
 Check if majority of the group is unreachable. More...
 
virtual bool is_unreachable_member_present ()=0
 Check if an unreachable member exists. More...
 
virtual bool is_recovering_member_present ()=0
 Check if a member in recovery exists in the group. More...
 
virtual std::string get_string_current_view_active_hosts () const =0
 This method returns all ONLINE and RECOVERING members comma separated host and port in string format. More...
 
virtual mysql_mutex_tget_update_lock ()=0
 This method returns the update lock for consistent read of member state. More...
 

Constructor & Destructor Documentation

◆ ~Group_member_info_manager_interface()

virtual Group_member_info_manager_interface::~Group_member_info_manager_interface ( )
virtualdefault

Member Function Documentation

◆ add()

virtual void Group_member_info_manager_interface::add ( Group_member_info new_member)
pure virtual

Adds a new member to be managed by this Group manager.

Parameters
[in]new_membernew group member

Implemented in Group_member_info_manager.

◆ decode()

virtual Group_member_info_list * Group_member_info_manager_interface::decode ( const uchar to_decode,
size_t  length 
)
pure virtual

Decodes the raw format of this object.

Parameters
[in]to_decoderaw encoded data
[in]lengthraw encoded data length
Returns
a vector of Group_member_info references

Implemented in Group_member_info_manager.

◆ encode()

virtual void Group_member_info_manager_interface::encode ( std::vector< uchar > *  to_encode)
pure virtual

Encodes this object to send via the network.

Parameters
[out]to_encodeout parameter to receive the encoded data

Implemented in Group_member_info_manager.

◆ get_all_members()

virtual Group_member_info_list * Group_member_info_manager_interface::get_all_members ( )
pure virtual

Retrieves all Group members managed by this site.

Returns
a vector with copies to all managed Group_member_info

Implemented in Group_member_info_manager.

◆ get_group_lowest_online_version()

virtual Member_version Group_member_info_manager_interface::get_group_lowest_online_version ( )
pure virtual

Return lowest member version.

Returns
group lowest version, if used at place where member can be OFFLINE or in ERROR state, version 0xFFFFFF may be returned(not found)

Implemented in Group_member_info_manager.

◆ get_group_member_info()

virtual bool Group_member_info_manager_interface::get_group_member_info ( const std::string &  uuid,
Group_member_info member_info_arg 
)
pure virtual

Retrieves a registered Group member by its uuid.

Parameters
[in]uuiduuid to retrieve
[out]member_info_arga member info reference local to the method caller that is updated when the member is found.
Returns
true if the member is not found. false if the member is found.

Implemented in Group_member_info_manager.

◆ get_group_member_info_by_index()

virtual bool Group_member_info_manager_interface::get_group_member_info_by_index ( int  idx,
Group_member_info member_info_arg 
)
pure virtual

Retrieves a registered Group member by an index function.

One is free to determine the index function. Nevertheless, it should have the same result regardless of the member of the group where it is called

Parameters
[in]idxthe index
[out]member_info_arga member info reference local to the method caller that is updated when the member is found.
Returns
true if the member is not found. false if the member is found.

Implemented in Group_member_info_manager.

◆ get_group_member_info_by_member_id()

virtual bool Group_member_info_manager_interface::get_group_member_info_by_member_id ( const Gcs_member_identifier id,
Group_member_info member_info_arg 
)
pure virtual

Retrieves a registered Group member by its backbone GCS identifier.

Parameters
[in]idthe GCS identifier
[out]member_info_arga member info reference local to the method caller that is updated when the member is found.
Returns
true if the member is not found. false if the member is found.

Implemented in Group_member_info_manager.

◆ get_group_member_status_by_member_id()

virtual Group_member_info::Group_member_status Group_member_info_manager_interface::get_group_member_status_by_member_id ( const Gcs_member_identifier id)
pure virtual

Return the status of the member with the given GCS identifier.

Parameters
[in]idthe GCS identifier
Returns
status of the member, Group_member_info::MEMBER_END if the member does not exist.

Implemented in Group_member_info_manager.

◆ get_number_of_members()

virtual size_t Group_member_info_manager_interface::get_number_of_members ( )
pure virtual

Number of members in the group.

Returns
number of members

Implemented in Group_member_info_manager.

◆ get_number_of_members_online()

virtual size_t Group_member_info_manager_interface::get_number_of_members_online ( )
pure virtual

Number of ONLINE members in the group.

UNREACHABLE members are included.

Returns
number of ONLINE members

Implemented in Group_member_info_manager.

◆ get_online_members_with_guarantees()

virtual std::list< Gcs_member_identifier > * Group_member_info_manager_interface::get_online_members_with_guarantees ( const Gcs_member_identifier exclude_member)
pure virtual

Retrieves all ONLINE Group members managed by this site, or NULL if any group member version is from a version lower than TRANSACTION_WITH_GUARANTEES_VERSION.

Returns
list of all ONLINE members, if all members have version equal or greater than TRANSACTION_WITH_GUARANTEES_VERSION otherwise NULL
Note
the memory allocated for the list ownership belongs to the caller

Implemented in Group_member_info_manager.

◆ get_primary_member_info()

virtual bool Group_member_info_manager_interface::get_primary_member_info ( Group_member_info member_info_arg)
pure virtual

Return the group member info for the current group primary.

Parameters
[out]member_info_arga member info reference local to the method caller that is updated when the member is found.
Returns
true if the member is not found. false if the member is found.

Implemented in Group_member_info_manager.

◆ get_primary_member_uuid()

virtual bool Group_member_info_manager_interface::get_primary_member_uuid ( std::string &  primary_member_uuid)
pure virtual

Return the uuid for the for the primary.

Parameters
[out]primary_member_uuidthe uuid of the primary will be assigned here.
Note
If there is no primary or the member is on error state, the returned uuid is "UNDEFINED". If not on primary mode it returns an empty string.
Returns
true if the member is in primary mode, false if it is not.

Implemented in Group_member_info_manager.

◆ get_string_current_view_active_hosts()

virtual std::string Group_member_info_manager_interface::get_string_current_view_active_hosts ( ) const
pure virtual

This method returns all ONLINE and RECOVERING members comma separated host and port in string format.

Returns
hosts and port of all ONLINE and RECOVERING members

Implemented in Group_member_info_manager.

◆ get_update_lock()

virtual mysql_mutex_t * Group_member_info_manager_interface::get_update_lock ( )
pure virtual

This method returns the update lock for consistent read of member state.

Returns
update_lock reference

Implemented in Group_member_info_manager.

◆ is_conflict_detection_enabled()

virtual bool Group_member_info_manager_interface::is_conflict_detection_enabled ( )
pure virtual

Check if some member of the group has the conflict detection enable.

Returns
true if at least one member has conflict detection enabled

Implemented in Group_member_info_manager.

◆ is_majority_unreachable()

virtual bool Group_member_info_manager_interface::is_majority_unreachable ( )
pure virtual

Check if majority of the group is unreachable.

This approach is optimistic, right after return the majority can be reestablish or go away.

Returns
true if majority of the group is unreachable

Implemented in Group_member_info_manager.

◆ is_member_info_present()

virtual bool Group_member_info_manager_interface::is_member_info_present ( const std::string &  uuid)
pure virtual

Is the member present in the group info.

Parameters
[in]uuiduuid to check
Returns
true if present, false otherwise

Implemented in Group_member_info_manager.

◆ is_recovering_member_present()

virtual bool Group_member_info_manager_interface::is_recovering_member_present ( )
pure virtual

Check if a member in recovery exists in the group.

This approach is optimistic, right after return a member can enter the group

Returns
true if a member in recovery exists

Implemented in Group_member_info_manager.

◆ is_unreachable_member_present()

virtual bool Group_member_info_manager_interface::is_unreachable_member_present ( )
pure virtual

Check if an unreachable member exists.

This approach is optimistic, right after return a member can be marked as reachable/unreachable

Returns
true if an unreachable member exists

Implemented in Group_member_info_manager.

◆ set_member_reachable()

virtual void Group_member_info_manager_interface::set_member_reachable ( const std::string &  uuid)
pure virtual

Sets the identified member as reachable.

Parameters
[in]uuidmember uuid

Implemented in Group_member_info_manager.

◆ set_member_unreachable()

virtual void Group_member_info_manager_interface::set_member_unreachable ( const std::string &  uuid)
pure virtual

Sets the identified member as unreachable.

Parameters
[in]uuidmember uuid

Implemented in Group_member_info_manager.

◆ update() [1/2]

virtual void Group_member_info_manager_interface::update ( Group_member_info update_local_member)
pure virtual

Removes all members of the group and update new local member.

Parameters
[in]update_local_membernew Group member

Implemented in Group_member_info_manager.

◆ update() [2/2]

virtual void Group_member_info_manager_interface::update ( Group_member_info_list new_members)
pure virtual

Updates all members of the group.

Typically used after a view change.

Parameters
[in]new_membersnew Group members

Implemented in Group_member_info_manager.

◆ update_enforce_everywhere_checks_flag()

virtual void Group_member_info_manager_interface::update_enforce_everywhere_checks_flag ( bool  enforce_everywhere)
pure virtual

Set the enforces_update_everywhere_checks flag on all members.

Parameters
enforce_everywhereare the update everywhere checks active or not

Implemented in Group_member_info_manager.

◆ update_group_primary_roles()

virtual void Group_member_info_manager_interface::update_group_primary_roles ( const std::string &  uuid,
Notification_context ctx 
)
pure virtual

Updates the primary/secondary roles of the group.

This method allows for all roles to be updated at once in the same method

Parameters
[in]uuidthe primary member uuid
[in,out]ctxThe notification context to update.

Implemented in Group_member_info_manager.

◆ update_gtid_sets()

virtual void Group_member_info_manager_interface::update_gtid_sets ( const std::string &  uuid,
std::string &  gtid_executed,
std::string &  purged_gtids,
std::string &  gtid_retrieved 
)
pure virtual

Updates the GTID sets on a single member.

Parameters
[in]uuidmember uuid
[in]gtid_executedthe member executed GTID set
[in]purged_gtidsthe server purged GTID set
[in]gtid_retrievedthe member retrieved GTID set for the applier

Implemented in Group_member_info_manager.

◆ update_member_role()

virtual void Group_member_info_manager_interface::update_member_role ( const std::string &  uuid,
Group_member_info::Group_member_role  new_role,
Notification_context ctx 
)
pure virtual

Updates the role of a single member.

Parameters
[in]uuidmember uuid
[in]new_rolerole to change to
[in,out]ctxThe notification context to update.

Implemented in Group_member_info_manager.

◆ update_member_status()

virtual void Group_member_info_manager_interface::update_member_status ( const std::string &  uuid,
Group_member_info::Group_member_status  new_status,
Notification_context ctx 
)
pure virtual

Updates the status of a single member.

Parameters
[in]uuidmember uuid
[in]new_statusstatus to change to
[in,out]ctxThe notification context to update.

Implemented in Group_member_info_manager.

◆ update_member_weight()

virtual void Group_member_info_manager_interface::update_member_weight ( const std::string &  uuid,
uint  member_weight 
)
pure virtual

Updates the weight of a single member.

Parameters
[in]uuidmember uuid
[in]member_weightthe new weight

Implemented in Group_member_info_manager.

◆ update_primary_member_flag()

virtual void Group_member_info_manager_interface::update_primary_member_flag ( bool  in_primary_mode)
pure virtual

Changes the primary flag on all members.

Parameters
in_primary_modeis the member in primary mode

Implemented in Group_member_info_manager.


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