23#ifndef GCS_XCOM_GROUP_MEMBER_INFORMATION_INCLUDED
24#define GCS_XCOM_GROUP_MEMBER_INFORMATION_INCLUDED
45#include "plugin/group_replication/libmysqlgcs/xdr_gen/xcom_vp.h"
215 const unsigned int node_no,
445 const std::vector<Gcs_xcom_node_information> &
get_nodes()
const;
518 bool encode(
unsigned int *ptr_size,
char const ***ptr_addrs,
537 std::vector<Gcs_xcom_node_information>
m_nodes;
It represents the identity of a group member within a certain group.
Definition: gcs_member_identifier.h:39
Stores connection information associated with a node.
Definition: gcs_xcom_group_member_information.h:50
virtual ~Gcs_xcom_node_address()
std::string m_member_ip
Definition: gcs_xcom_group_member_information.h:104
bool is_valid() const
A Gcs_xcom_node_address holds the representation IP:PORT of an XCom node.
Definition: gcs_xcom_group_member_information.cc:61
xcom_port get_member_port()
Return the port number.
Definition: gcs_xcom_group_member_information.cc:55
std::string & get_member_ip()
Return the IP address.
Definition: gcs_xcom_group_member_information.cc:53
std::string m_member_address
Definition: gcs_xcom_group_member_information.h:99
Gcs_xcom_node_address(std::string member_address)
Gcs_xcom_node_address constructor.
Definition: gcs_xcom_group_member_information.cc:36
xcom_port m_member_port
Definition: gcs_xcom_group_member_information.h:109
std::string & get_member_address()
Return address using the format ip:port.
Definition: gcs_xcom_group_member_information.cc:49
std::string * get_member_representation() const
Return an internal representation.
Definition: gcs_xcom_group_member_information.cc:57
This class contains information on the configuration, i.e set of nodes or simply site definition.
Definition: gcs_xcom_group_member_information.h:390
bool is_valid() const
Return with the configuration is valid or not.
Definition: gcs_xcom_group_member_information.h:430
void add_node(const Gcs_xcom_node_information &node)
Add a node to the set of nodes.
Definition: gcs_xcom_group_member_information.cc:349
unsigned int get_node_no() const
Return the index of the current node (i.e.
Definition: gcs_xcom_group_member_information.cc:298
bool encode(unsigned int *ptr_size, char const ***ptr_addrs, blob **ptr_uuids)
Encode the information on the set of nodes in a format that can be interpreted by XCOM to boot,...
Definition: gcs_xcom_group_member_information.cc:381
void set_node_no(unsigned int node_no)
Definition: gcs_xcom_group_member_information.cc:294
char const ** m_addrs
Definition: gcs_xcom_group_member_information.h:547
const std::vector< Gcs_xcom_node_information > & get_nodes() const
Return a reference to the addresses' vector.
Definition: gcs_xcom_group_member_information.cc:301
blob * m_uuids
Definition: gcs_xcom_group_member_information.h:552
void remove_node(const Gcs_xcom_node_information &node)
Remove a node from the set of nodes.
Definition: gcs_xcom_group_member_information.cc:354
unsigned int m_node_no
Definition: gcs_xcom_group_member_information.h:532
const Gcs_xcom_node_information * get_node(const Gcs_member_identifier &member_id) const
Return a pointer to a node if it exists, otherwise NULL.
Definition: gcs_xcom_group_member_information.cc:306
void clear_nodes()
Clear the set of nodes.
Definition: gcs_xcom_group_member_information.cc:376
Gcs_xcom_nodes(const Gcs_xcom_nodes &)
Gcs_xcom_nodes()
Constructor that reads the site definition and whether a node is considered dead or alive to build a ...
Definition: gcs_xcom_group_member_information.cc:257
unsigned int m_size
Definition: gcs_xcom_group_member_information.h:542
void free_encode()
Definition: gcs_xcom_group_member_information.cc:430
unsigned int get_size() const
Return the number of nodes in the set.
Definition: gcs_xcom_group_member_information.cc:345
std::vector< Gcs_xcom_node_information > m_nodes
Definition: gcs_xcom_group_member_information.h:537
bool empty() const
Whether the set of nodes is empty or not.
Definition: gcs_xcom_group_member_information.cc:347
void add_nodes(const Gcs_xcom_nodes &xcom_nodes)
Clear up the current set and add a new set of nodes.
Definition: gcs_xcom_group_member_information.cc:366
virtual ~Gcs_xcom_nodes()
Destructor for Gcs_xcom_nodes.
Definition: gcs_xcom_group_member_information.cc:291
Gcs_xcom_nodes & operator=(const Gcs_xcom_nodes &)
Definition: gcs_xcom_proxy.h:52
Definition: gcs_xcom_group_member_information.h:115
std::pair< bool, blob > make_xcom_blob() const
Converts this UUID into its corresponding XCom blob type.
Definition: gcs_xcom_group_member_information.cc:238
std::string actual_value
Definition: gcs_xcom_group_member_information.h:171
static Gcs_xcom_uuid create_uuid()
Definition: gcs_xcom_group_member_information.cc:177
Gcs_xcom_uuid(const std::string xcom_uuid) noexcept
Definition: gcs_xcom_group_member_information.h:125
bool decode(const uchar *buffer, const unsigned int size)
Definition: gcs_xcom_group_member_information.cc:225
bool encode(uchar **buffer, unsigned int *size) const
Definition: gcs_xcom_group_member_information.cc:212
unsigned char uchar
Definition: my_inttypes.h:51
constexpr value_type blob
Definition: classic_protocol_constants.h:271
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:497
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:419
#define VOID_NODE_NO
Definition: node_no.h:35
Definition: site_struct.h:42
Rudimentary task system in portable C, based on Tom Duff's switch-based coroutine trick and a stack o...
unsigned short xcom_port
Definition: xcom_common.h:45
static void alive(server *s)
Definition: xcom_transport.cc:159