24#ifndef GCS_XCOM_INTERFACE_INCLUDED
25#define GCS_XCOM_INTERFACE_INCLUDED
70 xcom_event_horizon event_horizon);
85 bool same_view(synode_no config_id)
const;
308 const std::string *debug_path);
Circular buffer that can be used to asynchronously feed a sink.
Definition: gcs_logging_system.h:191
This interface represents all the communication facilities that a binding implementation should provi...
Definition: gcs_communication_interface.h:90
This interface represents all the control functionalities that a binding implementation must provide.
Definition: gcs_control_interface.h:111
Default debugger which is used only by GCS and XCOM.
Definition: gcs_logging_system.h:510
This represents the unique identification of a group.
Definition: gcs_group_identifier.h:35
Definition: gcs_group_management_interface.h:32
This class is to be used to provide parameters to bindings in a transparent and generic way.
Definition: gcs_types.h:59
This interface must be implemented by all specific binding implementations as its entry point.
Definition: gcs_interface.h:101
Definition: gcs_xcom_networking.h:255
This interface represents all statistics that a binding implementation should provide.
Definition: gcs_statistics_interface.h:33
This class stores all node suspicions, as well as the timeout and period parameters used by the threa...
Definition: gcs_xcom_control_interface.h:69
A Gcs_xcom_interface needs to have an instance of this class initialized before engaging XCom.
Definition: gcs_xcom_proxy.h:1045
Keep track of the most recent XCom configuration the node will deliver upwards.
Definition: gcs_xcom_interface.h:55
synode_no config_id_
Definition: gcs_xcom_interface.h:121
bool same_xcom_nodes(Gcs_xcom_nodes const &xcom_nodes) const
Checks whether this configuration's membership matches the given membership.
Definition: gcs_xcom_interface.cc:83
Gcs_xcom_config & operator=(Gcs_xcom_config const &)=delete
xcom_event_horizon event_horizon_
Definition: gcs_xcom_interface.h:123
Gcs_xcom_config(Gcs_xcom_config &&)=delete
bool same_event_horizon(xcom_event_horizon const &event_horizon) const
Checks whether this configuration's event horizon matches the given event horizon.
Definition: gcs_xcom_interface.cc:97
Gcs_xcom_config()
Definition: gcs_xcom_interface.cc:60
Gcs_xcom_nodes xcom_nodes_
Definition: gcs_xcom_interface.h:122
Gcs_xcom_config(Gcs_xcom_config const &)=delete
bool same_xcom_nodes_v3(Gcs_xcom_nodes const &xcom_nodes) const
Checks whether this configuration's membership matches the given membership.
Definition: gcs_xcom_interface.cc:102
void reset()
Resets the object to its initial state.
Definition: gcs_xcom_interface.cc:63
bool same_view(synode_no config_id) const
Checks whether this configuration's synod matches the the given synod.
Definition: gcs_xcom_interface.cc:79
void update(synode_no config_id, Gcs_xcom_nodes const &xcom_nodes, xcom_event_horizon event_horizon)
Updates this configuration's information.
Definition: gcs_xcom_interface.cc:69
Gcs_xcom_config & operator=(Gcs_xcom_config &&)=delete
bool has_view() const
Checks whether this configuration pertains to a received XCom view, i.e.
Definition: gcs_xcom_interface.cc:77
Implementation of the Gcs_interface for the XCom binding.
Definition: gcs_xcom_interface.h:149
Gcs_async_buffer * m_default_sink
Definition: gcs_xcom_interface.h:419
gcs_xcom_group_interfaces * get_group_interfaces(const Gcs_group_identifier &group_identifier)
Internal helper method that retrieves all group interfaces for a certain group.
Definition: gcs_xcom_interface.cc:738
Gcs_xcom_interface & operator=(Gcs_xcom_interface const &)
enum_gcs_error configure(const Gcs_interface_parameters &interface_params) override
Method used by a binding implementation in order to implement any type of necessary dynamic reconfigu...
Definition: gcs_xcom_interface.cc:434
Gcs_default_debugger * m_default_debugger
Definition: gcs_xcom_interface.h:425
Gcs_statistics_interface * get_statistics(const Gcs_group_identifier &group_identifier) override
Method that retrieves the binding implementation of the Statistics interface.
Definition: gcs_xcom_interface.cc:723
enum_gcs_error initialize(const Gcs_interface_parameters &interface_params) override
This block implements the virtual methods defined in Gcs_interface.
Definition: gcs_xcom_interface.cc:314
enum_gcs_error setup_runtime_resources(Gcs_interface_runtime_requirements &reqs) override
Definition: gcs_xcom_interface.cc:821
static Gcs_interface * interface_reference_singleton
Definition: gcs_xcom_interface.h:152
Gcs_control_interface * get_control_session(const Gcs_group_identifier &group_identifier) override
Method that retrieves the binding implementation of the Control Session interface.
Definition: gcs_xcom_interface.cc:708
bool m_is_initialized
Definition: gcs_xcom_interface.h:395
Network_namespace_manager * m_netns_manager
Network namespace service provider.
Definition: gcs_xcom_interface.h:445
void announce_finalize_to_view_control()
Announces that a finalize was called to all group instances that use a Gcs_xcom_view_change_control_i...
Definition: gcs_xcom_interface.cc:652
static Gcs_interface * get_interface()
Since one wants that a single instance exists, the interface implementation shall be retrieved via a ...
Definition: gcs_xcom_interface.cc:184
void clean_group_references()
Internal helper method to delete all previously created group references.
Definition: gcs_xcom_interface.cc:863
Gcs_communication_interface * get_communication_session(const Gcs_group_identifier &group_identifier) override
Method that retrieves the binding implementation of the Communication Session interface.
Definition: gcs_xcom_interface.cc:715
Gcs_group_identifier * get_xcom_group_information(const u_long group_id)
Definition: gcs_xcom_interface.cc:1179
Gcs_ip_allowlist & get_ip_allowlist()
Must return the allowlist.
Definition: gcs_xcom_interface.cc:1335
enum_gcs_error cleanup_runtime_resources(Gcs_interface_runtime_requirements &reqs) override
Definition: gcs_xcom_interface.cc:834
bool set_xcom_identity(Gcs_xcom_node_information const &node_information, Gcs_xcom_proxy &xcom_proxy)
Used to initialize the unique identifier of the XCom instance.
Definition: gcs_xcom_interface.cc:887
~Gcs_xcom_interface() override
void initialize_peer_nodes(const std::string *peer_nodes)
Helper used to parse the peer_nodes parameter and to initialize XCom peer nodes.
Definition: gcs_xcom_interface.cc:1137
bool initialize_xcom(const Gcs_interface_parameters &interface_params)
Contains all the code needed to initialize a connection to the xcom daemon.
Definition: gcs_xcom_interface.cc:906
enum_gcs_error finalize() override
Method used by a binding implementation in order to implement any internal shutdown procedure.
Definition: gcs_xcom_interface.cc:658
Gcs_xcom_node_address * m_node_address
Definition: gcs_xcom_interface.h:387
Gcs_ip_allowlist m_ip_allowlist
The IP allowlist.
Definition: gcs_xcom_interface.h:430
bool m_boot
Definition: gcs_xcom_interface.h:397
void finalize_xcom()
Contains all the code needed to stop the xcom daemon if it was not already stopped as it should have ...
Definition: gcs_xcom_interface.cc:614
void make_gcs_leave_group_on_error()
Makes GCS leave the group when an error has caused XCom to terminate unexpectedly.
Definition: gcs_xcom_interface.cc:635
My_xp_mutex_impl m_wait_for_ssl_init_mutex
Definition: gcs_xcom_interface.h:440
bool is_initialized() override
Method used to report if the binding interface has already been initialized.
Definition: gcs_xcom_interface.cc:706
enum_gcs_error set_logger(Logger_interface *logger) override
Method that retrieves the binding implementation of the Group Management Session interface.
Definition: gcs_xcom_interface.cc:817
enum_gcs_error initialize_logging(const std::string *debug_file, const std::string *debug_path)
Method to initialize the logging and debugging systems.
Definition: gcs_xcom_interface.cc:239
std::map< u_long, Gcs_group_identifier * > m_xcom_configured_groups
Definition: gcs_xcom_interface.h:382
std::vector< Gcs_xcom_node_address * > m_xcom_peers
Definition: gcs_xcom_interface.h:392
My_xp_cond_impl m_wait_for_ssl_init_cond
protects the m_ssl_init_state thread shared variable
Definition: gcs_xcom_interface.h:439
void set_node_address(std::string const &address)
Definition: gcs_xcom_interface.cc:1204
static void cleanup_thread_ssl_resources()
Public method that cleans thread-local resources related to communication.
Definition: gcs_xcom_interface.cc:210
Logger_interface * m_default_logger
Definition: gcs_xcom_interface.h:422
Gcs_xcom_node_address * get_node_address()
Definition: gcs_xcom_interface.cc:1199
int m_ssl_init_state
Indicates whether SSL has been initialized and if that initialization was successful.
Definition: gcs_xcom_interface.h:436
Gcs_group_management_interface * get_management_session(const Gcs_group_identifier &group_identifier) override
Method that retrieves the binding implementation of the Group Management Session interface.
Definition: gcs_xcom_interface.cc:731
Gcs_xcom_interface()
XCom binding private constructor.
Definition: gcs_xcom_interface.cc:215
enum_gcs_error finalize_logging()
Method to finalize the logging and debugging systems.
Definition: gcs_xcom_interface.cc:286
Gcs_xcom_app_cfg m_gcs_xcom_app_cfg
The C++ interface to setup and configure xcom properties from GCS.
Definition: gcs_xcom_interface.h:410
Gcs_interface_parameters m_initialization_parameters
The initialization parameters provided through the initialize member function.
Definition: gcs_xcom_interface.h:416
const Gcs_interface_parameters & get_initialization_parameters()
This member function shall return the set of parameters that configure the interface at the time its ...
Definition: gcs_xcom_interface.h:248
void clean_group_interfaces()
Internal helper method to delete all previously created group interfaces.
Definition: gcs_xcom_interface.cc:845
void set_xcom_group_information(const std::string &group_id)
Definition: gcs_xcom_interface.cc:1160
void clear_peer_nodes()
Helper used to delete the existing XCom peer nodes in m_xcom_peers and to clear that vector.
Definition: gcs_xcom_interface.cc:1153
My_xp_socket_util * m_socket_util
Definition: gcs_xcom_interface.h:399
enum_gcs_error configure_message_stages(const Gcs_group_identifier &gid)
Definition: gcs_xcom_interface.cc:1210
Gcs_xcom_interface(Gcs_xcom_interface const &)
static void cleanup()
Public method that finalizes and cleans the singleton.
Definition: gcs_xcom_interface.cc:200
enum_gcs_error configure_suspicions_mgr(Gcs_interface_parameters &p, Gcs_suspicions_manager *mgr)
Definition: gcs_xcom_interface.cc:1290
std::map< std::string, gcs_xcom_group_interfaces * > m_group_interfaces
Definition: gcs_xcom_interface.h:380
void initialize_ssl()
Used to initialize SSL assuming that the necessary parameters have already been read.
Definition: gcs_xcom_interface.cc:880
Stores connection information associated with a node.
Definition: gcs_xcom_group_member_information.h:51
This class contains information on the configuration, i.e set of nodes or simply site definition.
Definition: gcs_xcom_group_member_information.h:391
Definition: gcs_xcom_proxy.h:52
Definition: gcs_xcom_state_exchange.h:370
Definition: gcs_xcom_state_exchange.h:716
Logger interface that must be used to define a logger object.
Definition: gcs_logging.h:125
Definition: my_xp_cond.h:136
Definition: my_xp_mutex.h:123
Interface for socket utility methods.
Definition: my_xp_util.h:154
Class that provides Network Namespace services.
Definition: network_provider.h:253
const char * p
Definition: ctype-mb.cc:1237
enum_gcs_error
This enumeration describes errors which can occur during group communication operations.
Definition: gcs_types.h:41
int cb_xcom_match_port(xcom_port if_port)
Definition: gcs_xcom_interface.cc:1752
struct xcom_group_interfaces gcs_xcom_group_interfaces
Struct that holds instances of this binding interface implementations.
static Logger logger
The "top-level" logger used when no connection context is given.
Definition: test_trace_plugin.cc:296
Runtime external resources that should be provided to an instance of Gcs_interface.
Definition: gcs_interface.h:41
Struct that holds instances of this binding interface implementations.
Definition: gcs_xcom_interface.h:131
Gcs_statistics_interface * statistics_interface
Definition: gcs_xcom_interface.h:134
Gcs_group_management_interface * management_interface
Definition: gcs_xcom_interface.h:135
Gcs_xcom_state_exchange_interface * se
Definition: gcs_xcom_interface.h:142
Gcs_control_interface * control_interface
Definition: gcs_xcom_interface.h:132
Gcs_xcom_view_change_control_interface * vce
Definition: gcs_xcom_interface.h:141
Gcs_communication_interface * communication_interface
Definition: gcs_xcom_interface.h:133
__u_long u_long
Definition: types.h:74
unsigned short xcom_port
Definition: xcom_common.h:46