24#ifndef GCS_XCOM_GROUP_MEMBER_INFORMATION_INCLUDED
25#define GCS_XCOM_GROUP_MEMBER_INFORMATION_INCLUDED
46#include "plugin/group_replication/libmysqlgcs/xdr_gen/xcom_vp.h"
216 const unsigned int node_no,
446 const std::vector<Gcs_xcom_node_information> &
get_nodes()
const;
519 bool encode(
unsigned int *ptr_size,
char const ***ptr_addrs,
538 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:40
Stores connection information associated with a node.
Definition: gcs_xcom_group_member_information.h:51
virtual ~Gcs_xcom_node_address()
std::string m_member_ip
Definition: gcs_xcom_group_member_information.h:105
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:62
xcom_port get_member_port()
Return the port number.
Definition: gcs_xcom_group_member_information.cc:56
std::string & get_member_ip()
Return the IP address.
Definition: gcs_xcom_group_member_information.cc:54
std::string m_member_address
Definition: gcs_xcom_group_member_information.h:100
Gcs_xcom_node_address(std::string member_address)
Gcs_xcom_node_address constructor.
Definition: gcs_xcom_group_member_information.cc:37
xcom_port m_member_port
Definition: gcs_xcom_group_member_information.h:110
std::string & get_member_address()
Return address using the format ip:port.
Definition: gcs_xcom_group_member_information.cc:50
std::string * get_member_representation() const
Return an internal representation.
Definition: gcs_xcom_group_member_information.cc:58
This class contains information on the configuration, i.e set of nodes or simply site definition.
Definition: gcs_xcom_group_member_information.h:391
bool is_valid() const
Return with the configuration is valid or not.
Definition: gcs_xcom_group_member_information.h:431
void add_node(const Gcs_xcom_node_information &node)
Add a node to the set of nodes.
Definition: gcs_xcom_group_member_information.cc:350
unsigned int get_node_no() const
Return the index of the current node (i.e.
Definition: gcs_xcom_group_member_information.cc:299
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:382
void set_node_no(unsigned int node_no)
Definition: gcs_xcom_group_member_information.cc:295
char const ** m_addrs
Definition: gcs_xcom_group_member_information.h:548
const std::vector< Gcs_xcom_node_information > & get_nodes() const
Return a reference to the addresses' vector.
Definition: gcs_xcom_group_member_information.cc:302
blob * m_uuids
Definition: gcs_xcom_group_member_information.h:553
void remove_node(const Gcs_xcom_node_information &node)
Remove a node from the set of nodes.
Definition: gcs_xcom_group_member_information.cc:355
unsigned int m_node_no
Definition: gcs_xcom_group_member_information.h:533
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:307
void clear_nodes()
Clear the set of nodes.
Definition: gcs_xcom_group_member_information.cc:377
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:258
unsigned int m_size
Definition: gcs_xcom_group_member_information.h:543
void free_encode()
Definition: gcs_xcom_group_member_information.cc:431
unsigned int get_size() const
Return the number of nodes in the set.
Definition: gcs_xcom_group_member_information.cc:346
std::vector< Gcs_xcom_node_information > m_nodes
Definition: gcs_xcom_group_member_information.h:538
bool empty() const
Whether the set of nodes is empty or not.
Definition: gcs_xcom_group_member_information.cc:348
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:367
virtual ~Gcs_xcom_nodes()
Destructor for Gcs_xcom_nodes.
Definition: gcs_xcom_group_member_information.cc:292
Gcs_xcom_nodes & operator=(const Gcs_xcom_nodes &)
Definition: gcs_xcom_proxy.h:52
Definition: gcs_xcom_group_member_information.h:116
std::pair< bool, blob > make_xcom_blob() const
Converts this UUID into its corresponding XCom blob type.
Definition: gcs_xcom_group_member_information.cc:239
std::string actual_value
Definition: gcs_xcom_group_member_information.h:172
static Gcs_xcom_uuid create_uuid()
Definition: gcs_xcom_group_member_information.cc:178
Gcs_xcom_uuid(const std::string xcom_uuid) noexcept
Definition: gcs_xcom_group_member_information.h:126
bool decode(const uchar *buffer, const unsigned int size)
Definition: gcs_xcom_group_member_information.cc:226
bool encode(uchar **buffer, unsigned int *size) const
Definition: gcs_xcom_group_member_information.cc:213
unsigned char uchar
Definition: my_inttypes.h:52
constexpr value_type blob
Definition: classic_protocol_constants.h:272
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:496
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:420
#define VOID_NODE_NO
Definition: node_no.h:36
Definition: site_struct.h:43
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:46
static void alive(server *s)
Definition: xcom_transport.cc:161