24#ifndef GCS_XCOM_UTILS_INCLUDED
25#define GCS_XCOM_UTILS_INCLUDED
31#include "plugin/group_replication/libmysqlgcs/xdr_gen/xcom_vp.h"
33#define XCOM_PREFIX "[XCOM] "
59 std::vector<std::string> &processed_peers);
70 std::vector<std::string> &invalid_peers);
112 return s.find_first_not_of(
"0123456789") == std::string::npos;
This represents the unique identification of a group.
Definition: gcs_group_identifier.h:35
This class is to be used to provide parameters to bindings in a transparent and generic way.
Definition: gcs_types.h:59
Definition: gcs_xcom_utils.h:40
static uint32_t mhash(const unsigned char *buf, size_t length)
Simple multiplicative hash.
Definition: gcs_xcom_utils.cc:116
static void validate_peer_nodes(std::vector< std::string > &peers, std::vector< std::string > &invalid_peers)
Validates peer nodes according with IP/Address rules enforced by is_valid_hostname function.
Definition: gcs_xcom_utils.cc:102
static void process_peer_nodes(const std::string *peer_nodes, std::vector< std::string > &processed_peers)
Processes a list of comma separated peer nodes.
Definition: gcs_xcom_utils.cc:75
virtual ~Gcs_xcom_utils()
static u_long build_xcom_group_id(Gcs_group_identifier &group_id)
Create a xcom group identifier from a Group Identifier.
Definition: gcs_xcom_utils.cc:68
static int deinit_net()
Definition: gcs_xcom_utils.cc:128
static int init_net()
Definition: gcs_xcom_utils.cc:126
Class that provides Network Namespace services.
Definition: network_provider.h:242
Gcs_protocol_version
The GCS protocol versions.
Definition: gcs_types.h:128
bool is_number(const std::string &s)
Checks whether the given string is a number or not.
Definition: gcs_xcom_utils.h:111
bool is_valid_hostname(const std::string &server_and_port)
Parses the string "host:port" and checks if it is correct.
Definition: gcs_xcom_utils.cc:130
bool is_parameters_syntax_correct(const Gcs_interface_parameters ¶ms, Network_namespace_manager *netns_manager)
Checks that parameters are syntactically valid.
Definition: gcs_xcom_utils.cc:320
bool is_valid_protocol(std::string const &protocol)
Checks whether the given string is a valid GCS protocol known by this node.
Definition: gcs_xcom_utils.cc:284
std::string gcs_protocol_to_mysql_version(Gcs_protocol_version protocol)
Converts the given GCS protocol version into the MySQL version that introduced it.
Definition: gcs_xcom_utils.cc:663
void fix_parameters_syntax(Gcs_interface_parameters ¶ms)
Does some transformations on the parameters.
Definition: gcs_xcom_utils.cc:150
Definition: buf0block_hint.cc:30
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
__u_long u_long
Definition: types.h:74