MySQL 8.4.0
Source Code Documentation
Group_member_info_manager_message Class Reference

This is the Group_member_info_manager message. More...

#include <member_info.h>

Inheritance diagram for Group_member_info_manager_message:
[legend]

Public Types

enum  enum_payload_item_type {
  PIT_UNKNOWN = 0 , PIT_MEMBERS_NUMBER = 1 , PIT_MEMBER_DATA = 2 , PIT_MEMBER_ACTIONS = 3 ,
  PIT_RPL_FAILOVER_CONFIGURATION = 4 , PIT_MAX = 5
}
 
- Public Types inherited from Plugin_gcs_message
enum  enum_cargo_type {
  CT_UNKNOWN = 0 , CT_CERTIFICATION_MESSAGE = 1 , CT_TRANSACTION_MESSAGE = 2 , CT_RECOVERY_MESSAGE = 3 ,
  CT_MEMBER_INFO_MESSAGE = 4 , CT_MEMBER_INFO_MANAGER_MESSAGE = 5 , CT_PIPELINE_STATS_MEMBER_MESSAGE = 6 , CT_SINGLE_PRIMARY_MESSAGE = 7 ,
  CT_GROUP_ACTION_MESSAGE = 8 , CT_GROUP_VALIDATION_MESSAGE = 9 , CT_SYNC_BEFORE_EXECUTION_MESSAGE = 10 , CT_TRANSACTION_WITH_GUARANTEE_MESSAGE = 11 ,
  CT_TRANSACTION_PREPARED_MESSAGE = 12 , CT_MESSAGE_SERVICE_MESSAGE = 13 , CT_RECOVERY_METADATA_MESSAGE = 14 , CT_MAX = 15
}
 The different cargo type codes. More...
 

Public Member Functions

 Group_member_info_manager_message ()
 Group_member_info_manager_message constructor. More...
 
 Group_member_info_manager_message (Group_member_info_manager &group_info)
 Group_member_info_manager_message constructor. More...
 
 Group_member_info_manager_message (Group_member_info *member_info)
 Group_member_info_manager_message constructor. More...
 
 ~Group_member_info_manager_message () override
 Group_member_info_manager_message destructor. More...
 
Group_member_info_listget_all_members ()
 Retrieves all Group members on this message. More...
 
void add_member_actions_serialized_configuration (std::vector< unsigned char > *buffer, const std::string &member_actions_serialized_configuration) const
 Adds a already serialized member actions configuration to the Group_member_info_manager_message content. More...
 
bool get_pit_data (const enum_payload_item_type pit, const unsigned char *buffer, size_t length, const unsigned char **pit_data, size_t *pit_length)
 Gets the data that belongs to payload_item_type pit. More...
 
void add_replication_failover_channels_serialized_configuration (std::vector< unsigned char > *buffer, const std::string &replication_failover_channels_serialized_configuration) const
 Adds a already serialized replication failover channels configuration to the Group_member_info_manager_message content. More...
 
- Public Member Functions inherited from Plugin_gcs_message
virtual ~Plugin_gcs_message ()=default
 
int get_version ()
 
unsigned short get_header_length ()
 
enum_cargo_type get_cargo_type () const
 
unsigned long long get_msg_length ()
 
void encode (std::vector< unsigned char > *buffer) const
 Encodes the contents of this instance into the buffer. More...
 
void decode (const unsigned char *buffer, size_t length)
 Decodes the contents of the buffer and sets the field values according to the values decoded. More...
 

Protected Member Functions

void encode_payload (std::vector< unsigned char > *buffer) const override
 Encodes the contents of this instance payload into the buffer. More...
 
void decode_payload (const unsigned char *buffer, const unsigned char *end) override
 Decodes the contents of the buffer and sets the payload field values according to the values decoded. More...
 
- Protected Member Functions inherited from Plugin_gcs_message
 Plugin_gcs_message (enum_cargo_type cargo_type)
 Plugin_gcs_message constructor. More...
 
void encode_header (std::vector< unsigned char > *buffer) const
 Encodes the header of this instance into the buffer. More...
 
void decode_header (const unsigned char **slider)
 Decodes the header of the buffer into this instance. More...
 
void encode_payload_item_type_and_length (std::vector< unsigned char > *buffer, uint16 payload_item_type, unsigned long long payload_item_length) const
 Encodes the given payload item type and length into the buffer. More...
 
void encode_payload_item_char (std::vector< unsigned char > *buffer, uint16 type, unsigned char value) const
 Encodes the given payload item (type, length and value) into the buffer as a char (1 byte). More...
 
void encode_payload_item_int2 (std::vector< unsigned char > *buffer, uint16 type, uint16 value) const
 Encodes the given payload item (type, length and value) into the buffer as a 2 bytes integer. More...
 
void decode_payload_item_int2 (const unsigned char **buffer, uint16 *type, uint16 *value)
 Decodes the given payload item (type, length and value) from the buffer as a 2 bytes integer. More...
 
void encode_payload_item_int4 (std::vector< unsigned char > *buffer, uint16 type, uint32 value) const
 Encodes the given payload item (type, length and value) into the buffer as a 4 bytes integer. More...
 
void decode_payload_item_int4 (const unsigned char **buffer, uint16 *type, uint32 *value)
 Decodes the given payload item (type, length and value) from the buffer as a 4 bytes integer. More...
 
void encode_payload_item_int8 (std::vector< unsigned char > *buffer, uint16 type, ulonglong value) const
 Encodes the given payload item (type, length and value) into the buffer as a 8 bytes integer. More...
 
void encode_payload_item_string (std::vector< unsigned char > *buffer, uint16 type, const char *value, unsigned long long length) const
 Encodes the given payload item (type, length and value) into the buffer as a char array (variable size). More...
 
void decode_payload_item_string (const unsigned char **buffer, uint16 *type, std::string *value, unsigned long long *length)
 Decodes the given payload item (type, length and value) from the buffer as a char array (variable size). More...
 
void encode_payload_item_bytes (std::vector< unsigned char > *buffer, uint16 type, const unsigned char *value, unsigned long long length) const
 Encodes the given payload item (type, length and value) into the buffer as a byte buffer (variable size). More...
 
void decode_payload_item_bytes (const unsigned char **buffer, uint16 *type, unsigned char *value, unsigned long long *length)
 Decodes the given payload item (type, length and value) from the buffer as a byte buffer (variable size). More...
 

Private Member Functions

void clear_members ()
 Clear members and its allocated memory. More...
 

Private Attributes

Group_member_info_listmembers
 

Additional Inherited Members

- Static Public Member Functions inherited from Plugin_gcs_message
static enum_cargo_type get_cargo_type (const unsigned char *buffer)
 Return the cargo type of a given message buffer, without decode the complete message. More...
 
static void get_first_payload_item_raw_data (const unsigned char *buffer, const unsigned char **payload_item_data, size_t *payload_item_length)
 Return the raw data of the first payload item of a given message buffer, without decode the complete message. More...
 
static bool get_payload_item_type_raw_data (const unsigned char *buffer, const unsigned char *end, uint16 payload_item_type, const unsigned char **payload_item_data, unsigned long long *payload_item_length)
 Return the raw data of the payload item of a given payload type of a given message buffer. More...
 
- Static Public Attributes inherited from Plugin_gcs_message
static const int PLUGIN_GCS_MESSAGE_VERSION = 1
 The protocol version number. More...
 
static const unsigned int WIRE_VERSION_SIZE = 4
 The protocol version number. More...
 
static const unsigned int WIRE_HD_LEN_SIZE = 2
 The on-the-wire size of the header length field. More...
 
static const unsigned int WIRE_MSG_LEN_SIZE = 8
 The on-the-wire size of the message size field. More...
 
static const unsigned int WIRE_CARGO_TYPE_SIZE = 2
 The on-the-wire size of the cargo type field. More...
 
static const unsigned int WIRE_FIXED_HEADER_SIZE
 The on-the-wire size of the fixed header. More...
 
static const unsigned int WIRE_PAYLOAD_ITEM_TYPE_SIZE = 2
 The on-the-wire size of the each payload item type field. More...
 
static const unsigned int WIRE_PAYLOAD_ITEM_LEN_SIZE = 8
 The on-the-wire size of the each payload item size field. More...
 
static const unsigned int WIRE_PAYLOAD_ITEM_HEADER_SIZE
 The on-the-wire size of the payload item header. More...
 
- Static Protected Member Functions inherited from Plugin_gcs_message
static int64_t get_sent_timestamp (const unsigned char *buffer, size_t length, const uint16 timestamp_payload_item_type)
 Return the time at which the message contained in the buffer was sent. More...
 
static void decode_payload_item_type_and_length (const unsigned char **buffer, uint16 *payload_item_type, unsigned long long *payload_item_length)
 Decodes the given payload item type and length from the buffer. More...
 
static void decode_payload_item_char (const unsigned char **buffer, uint16 *type, unsigned char *value)
 Decodes the given payload item (type, length and value) from the buffer as a char (1 byte). More...
 
static void decode_payload_item_int8 (const unsigned char **buffer, uint16 *type, uint64 *value)
 Decodes the given payload item (type, length and value) from the buffer as a 8 bytes integer. More...
 

Detailed Description

This is the Group_member_info_manager message.

It is composed by a fixed header and 1 or more Group_member_info messages. Each Group_member_info message does have its own fixed header.

The on-the-wire representation of the message is:

+----------------—+--------—+-----------------------------------—+ | field | wire size | description | +===================+===========+======================================+ | version | 4 bytes | protocol version | | fixed_hdr_len | 2 bytes | length of the fixed header | | message_len | 8 bytes | length of the message | | cargo_type | 2 bytes | the cargo type in the payload | +----------------—+--------—+-----------------------------------—+ | payload_item_type | 2 bytes | PIT_MEMBERS_NUMBER | | payload_item_len | 8 bytes | size of PIT_MEMBERS_NUMBER value | | payload_item | X bytes | number of members | +----------------—+--------—+-----------------------------------—+ | payload_item_type | 2 bytes | PIT_MEMBER_DATA | | payload_item_len | 8 bytes | size of CT_MEMBER_INFO_MESSAGE data | | payload_item | X bytes | CT_MEMBER_INFO_MESSAGE data | +----------------—+--------—+-----------------------------------—+ | payload_item_type | 2 bytes | PIT_MEMBER_ACTIONS | | payload_item_len | 8 bytes | size of PIT_MEMBER_ACTIONS data | | payload_item | X bytes | PIT_MEMBER_ACTIONS data | +----------------—+--------—+-----------------------------------—+ | payload_item_type | 2 bytes | PIT_RPL_FAILOVER_CONFIGURATION | | payload_item_len | 8 bytes | size of | | | | PIT_RPL_FAILOVER_CONFIGURATION data | | payload_item | X bytes | PIT_RPL_FAILOVER_CONFIGURATION data | +----------------—+--------—+-----------------------------------—+

The PIT_MEMBER_DATA lines occur the number of times specified on PIT_MEMBERS_NUMBER. The PIT_MEMBER_ACTIONS and PIT_RPL_FAILOVER_CONFIGURATION lines will exist if the member that sent the Group_member_info_manager message is not joining.

Member Enumeration Documentation

◆ enum_payload_item_type

Enumerator
PIT_UNKNOWN 
PIT_MEMBERS_NUMBER 
PIT_MEMBER_DATA 
PIT_MEMBER_ACTIONS 
PIT_RPL_FAILOVER_CONFIGURATION 
PIT_MAX 

Constructor & Destructor Documentation

◆ Group_member_info_manager_message() [1/3]

Group_member_info_manager_message::Group_member_info_manager_message ( )

Group_member_info_manager_message constructor.

◆ Group_member_info_manager_message() [2/3]

Group_member_info_manager_message::Group_member_info_manager_message ( Group_member_info_manager group_info)

Group_member_info_manager_message constructor.

Parameters
[in]group_infoGroup_member_info_manager members information

◆ Group_member_info_manager_message() [3/3]

Group_member_info_manager_message::Group_member_info_manager_message ( Group_member_info member_info)

Group_member_info_manager_message constructor.

Parameters
[in]member_infoGroup_member_info one member information

◆ ~Group_member_info_manager_message()

Group_member_info_manager_message::~Group_member_info_manager_message ( )
override

Group_member_info_manager_message destructor.

Member Function Documentation

◆ add_member_actions_serialized_configuration()

void Group_member_info_manager_message::add_member_actions_serialized_configuration ( std::vector< unsigned char > *  buffer,
const std::string &  member_actions_serialized_configuration 
) const

Adds a already serialized member actions configuration to the Group_member_info_manager_message content.

Parameters
[in]buffermessage buffer
[in]member_actions_serialized_configurationserialized member actions configuration

◆ add_replication_failover_channels_serialized_configuration()

void Group_member_info_manager_message::add_replication_failover_channels_serialized_configuration ( std::vector< unsigned char > *  buffer,
const std::string &  replication_failover_channels_serialized_configuration 
) const

Adds a already serialized replication failover channels configuration to the Group_member_info_manager_message content.

Parameters
[in]buffermessage buffer
[in]replication_failover_channels_serialized_configurationserialized failover channels configuration

◆ clear_members()

void Group_member_info_manager_message::clear_members ( )
private

Clear members and its allocated memory.

◆ decode_payload()

void Group_member_info_manager_message::decode_payload ( const unsigned char *  buffer,
const unsigned char *  end 
)
overrideprotectedvirtual

Decodes the contents of the buffer and sets the payload field values according to the values decoded.

Parameters
[in]bufferthe buffer to decode from.
[in]endthe end of the buffer.

Implements Plugin_gcs_message.

◆ encode_payload()

void Group_member_info_manager_message::encode_payload ( std::vector< unsigned char > *  buffer) const
overrideprotectedvirtual

Encodes the contents of this instance payload into the buffer.

Parameters
[out]bufferthe buffer to encode to.

Implements Plugin_gcs_message.

◆ get_all_members()

Group_member_info_list * Group_member_info_manager_message::get_all_members ( )

Retrieves all Group members on this message.

Returns
a vector with copies to all members.

◆ get_pit_data()

bool Group_member_info_manager_message::get_pit_data ( const enum_payload_item_type  pit,
const unsigned char *  buffer,
size_t  length,
const unsigned char **  pit_data,
size_t *  pit_length 
)

Gets the data that belongs to payload_item_type pit.

Parameters
[in]pitthe payload_item_type to which the data belongs
[in]buffermessage buffer
[in]lengthmessage buffer length
[out]pit_datathe data from payload_item_type pit
[out]pit_lengththe length of the data from payload_item_type pit
Returns
the operation status
Return values
falseOK
truemember actions do not exist on the message

Member Data Documentation

◆ members

Group_member_info_list* Group_member_info_manager_message::members
private

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