MySQL 9.0.0
Source Code Documentation
Gcs_xcom_proxy Class Referenceabstract

#include <gcs_xcom_proxy.h>

Inheritance diagram for Gcs_xcom_proxy:
[legend]

Public Member Functions

 Gcs_xcom_proxy ()=default
 
virtual ~Gcs_xcom_proxy ()=default
 The destructor. More...
 
virtual node_address * new_node_address_uuid (unsigned int n, char const *names[], blob uuids[])=0
 This is an utility member function that is used to call into XCom for creating list with node's addresses and their associated UUIDs. More...
 
virtual void delete_node_address (unsigned int n, node_address *na)=0
 This function is responsible to delete the list of nodes that had been previously created by new_node_address. More...
 
virtual bool xcom_client_add_node (connection_descriptor *fd, node_list *nl, uint32_t group_id)=0
 This member function is responsible to call into XCom consensus and add a node to the group. More...
 
virtual bool xcom_client_remove_node (node_list *nl, uint32_t group_id)=0
 This member function is responsible for triggering the removal of a node from the XCom configuration. More...
 
virtual bool xcom_client_remove_node (connection_descriptor *fd, node_list *nl, uint32_t group_id)=0
 This member function is responsible for triggering the removal of a node from the XCom configuration. More...
 
virtual bool xcom_client_get_event_horizon (uint32_t group_id, xcom_event_horizon &event_horizon)=0
 This member function is responsible for retrieving the event horizon of the XCom configuration. More...
 
virtual bool xcom_client_set_event_horizon (uint32_t group_id, xcom_event_horizon event_horizon)=0
 This member function is responsible for triggering the reconfiguration of the event horizon of the XCom configuration. More...
 
virtual bool xcom_client_set_leaders (uint32_t group_id, u_int nr_preferred_leaders, char const *preferred_leaders[], node_no max_nr_leaders)=0
 This member function is responsible for triggering the reconfiguration of the leaders of the XCom configuration. More...
 
virtual bool xcom_client_get_leaders (uint32_t group_id, leader_info_data &leaders)=0
 This member function is responsible for retrieving the leaders of the XCom configuration. More...
 
virtual bool xcom_client_get_synode_app_data (connection_descriptor *fd, uint32_t group_id, synode_no_array &synodes, synode_app_data_array &reply)=0
 This member function is responsible for retrieving the application payloads decided in the synodes in synodes, from the XCom instance connected to via fd. More...
 
virtual bool xcom_client_set_cache_size (uint64_t size)=0
 This member function is responsible for setting a new value for the maximum size of the XCom cache. More...
 
virtual bool xcom_client_send_data (unsigned long long size, char *data)=0
 This member function is responsible for pushing data into consensus on XCom. More...
 
virtual void xcom_init (xcom_port listen_port)=0
 This member function initializes XCom. More...
 
virtual void xcom_exit ()=0
 This member function finishes the XCom thread. More...
 
virtual int xcom_get_ssl_mode (const char *mode)=0
 
virtual int xcom_set_ssl_mode (int mode)=0
 
virtual int xcom_get_ssl_fips_mode (const char *mode)=0
 
virtual int xcom_set_ssl_fips_mode (int mode)=0
 
virtual bool xcom_init_ssl ()=0
 Initialize the SSL. More...
 
virtual void xcom_destroy_ssl ()=0
 
virtual bool xcom_use_ssl ()=0
 Return whether the SSL will be used to encrypt data or not. More...
 
virtual void xcom_set_ssl_parameters (ssl_parameters ssl, tls_parameters tls)=0
 
virtual site_def const * find_site_def (synode_no synode)=0
 
virtual bool xcom_client_boot (node_list *nl, uint32_t group_id)=0
 This member function boots XCom. More...
 
virtual connection_descriptorxcom_client_open_connection (std::string addr, xcom_port port)=0
 This member function opens a connection to an XCom instance. More...
 
virtual bool xcom_client_close_connection (connection_descriptor *fd)=0
 This member function closes the connection to an XCom instance. More...
 
virtual enum_gcs_error xcom_wait_ready ()=0
 This member waits for XCom to be initialized. More...
 
virtual bool xcom_is_ready ()=0
 
virtual void xcom_set_ready (bool value)=0
 
virtual void xcom_signal_ready ()=0
 
virtual void xcom_wait_for_xcom_comms_status_change (int &status)=0
 Call this method to wait for XCom communications to be initialized. More...
 
virtual bool xcom_has_comms_status_changed ()=0
 
virtual void xcom_set_comms_status (int status)=0
 
virtual void xcom_signal_comms_status_changed (int status)=0
 
virtual enum_gcs_error xcom_wait_exit ()=0
 Call this method to wait for XCom to exit. More...
 
virtual bool xcom_is_exit ()=0
 This verifies if XCom has finished or not. More...
 
virtual void xcom_set_exit (bool value)=0
 This sets whether XCom has finished or not. More...
 
virtual void xcom_set_cleanup ()=0
 Clean up variables used to notify states in the XCOM's state machine. More...
 
virtual void xcom_signal_exit ()=0
 This modifies the internal cached status and signals all threads that might be waiting on xcom_wait_exit. More...
 
virtual bool xcom_client_force_config (node_list *nl, uint32_t group_id)=0
 This method forces XCom to inject a new configuration in the group, even if it does not contain a majority of members. More...
 
virtual bool xcom_boot_node (Gcs_xcom_node_information &node, uint32_t group_id_hash)=0
 Function used to boot a node in XCOM. More...
 
virtual bool xcom_remove_nodes (Gcs_xcom_nodes &nodes, uint32_t group_id_hash)=0
 Function to remove a set of nodes from XCOM. More...
 
virtual bool xcom_remove_nodes (connection_descriptor &con, Gcs_xcom_nodes &nodes, uint32_t group_id_hash)=0
 Function to remove a set of nodes from XCOM. More...
 
virtual bool xcom_remove_node (const Gcs_xcom_node_information &node, uint32_t group_id_hash)=0
 Function to remove a node from XCOM. More...
 
virtual bool xcom_add_nodes (connection_descriptor &con, Gcs_xcom_nodes &nodes, uint32_t group_id_hash)=0
 Function to add a set of nodes to XCOM. More...
 
virtual bool xcom_add_node (connection_descriptor &con, const Gcs_xcom_node_information &node, uint32_t group_id_hash)=0
 Function to add a node to XCOM. More...
 
virtual xcom_event_horizon xcom_get_minimum_event_horizon ()=0
 Function to retrieve XCOM's minimum supported event horizon value. More...
 
virtual xcom_event_horizon xcom_get_maximum_event_horizon ()=0
 Function to retrieve XCOM's maximum supported event horizon value. More...
 
virtual bool xcom_get_event_horizon (uint32_t group_id_hash, xcom_event_horizon &event_horizon)=0
 Function to retrieve XCOM's event horizon. More...
 
virtual bool xcom_get_synode_app_data (Gcs_xcom_node_information const &xcom_instance, uint32_t group_id_hash, const std::unordered_set< Gcs_xcom_synode > &synode_set, synode_app_data_array &reply)=0
 Function to retrieve the application payloads decided on a set of synodes. More...
 
virtual bool xcom_set_event_horizon (uint32_t group_id_hash, xcom_event_horizon event_horizon)=0
 Function to reconfigure XCOM's event horizon. More...
 
virtual bool xcom_set_leaders (uint32_t group_id_hash, u_int nr_preferred_leaders, char const *preferred_leaders[], node_no max_nr_leaders)=0
 
virtual bool xcom_get_leaders (uint32_t group_id_hash, leader_info_data &leaders)=0
 
virtual bool xcom_set_cache_size (uint64_t size)=0
 Function to reconfigure the maximum size of the XCom cache. More...
 
virtual bool xcom_force_nodes (Gcs_xcom_nodes &nodes, unsigned int group_id_hash)=0
 Function to force the set of nodes in XCOM's configuration. More...
 
virtual bool get_should_exit ()=0
 Function that retrieves the value that signals that XCom must be forcefully stopped. More...
 
virtual void set_should_exit (bool should_exit)=0
 Function that sets the value that signals that XCom must be forcefully stopped. More...
 
virtual bool xcom_input_connect (std::string const &address, xcom_port port)=0
 Opens the input channel to XCom. More...
 
virtual void xcom_input_disconnect ()=0
 Closes the input channel to XCom. More...
 
virtual bool xcom_input_try_push (app_data_ptr data)=0
 Attempts to send the command data to XCom. More...
 
virtual Gcs_xcom_input_queue::future_reply xcom_input_try_push_and_get_reply (app_data_ptr data)=0
 Attempts to send the command data to XCom, and returns a future to XCom's reply. More...
 
virtual xcom_input_request_ptr xcom_input_try_pop ()=0
 Attempts to retrieve incoming commands. More...
 
virtual bool test_xcom_tcp_connection (std::string &host, xcom_port port)=0
 Performs a test connection to the given XCom instance via TCP. More...
 
virtual bool initialize_network_manager ()=0
 Initializes XCom's Network Manager. More...
 
virtual bool finalize_network_manager ()=0
 Finalizes XCom's Network Manager. More...
 
virtual bool set_network_manager_active_provider (enum_transport_protocol new_value)=0
 Set XCom's network manager active provider. More...
 

Constructor & Destructor Documentation

◆ Gcs_xcom_proxy()

Gcs_xcom_proxy::Gcs_xcom_proxy ( )
explicitdefault

◆ ~Gcs_xcom_proxy()

virtual Gcs_xcom_proxy::~Gcs_xcom_proxy ( )
virtualdefault

The destructor.

Member Function Documentation

◆ delete_node_address()

virtual void Gcs_xcom_proxy::delete_node_address ( unsigned int  n,
node_address *  na 
)
pure virtual

This function is responsible to delete the list of nodes that had been previously created by new_node_address.

Parameters
nthe length of the list
nathe list to delete

Implemented in Gcs_xcom_proxy_impl.

◆ finalize_network_manager()

virtual bool Gcs_xcom_proxy::finalize_network_manager ( )
pure virtual

Finalizes XCom's Network Manager.

This cleans up everythins regarding network.

Returns
true in case of error, false otherwise.

Implemented in Gcs_xcom_proxy_base.

◆ find_site_def()

virtual site_def const * Gcs_xcom_proxy::find_site_def ( synode_no  synode)
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ get_should_exit()

virtual bool Gcs_xcom_proxy::get_should_exit ( )
pure virtual

Function that retrieves the value that signals that XCom must be forcefully stopped.

Returns
1 if XCom needs to forcefully exit. 0 otherwise.

Implemented in Gcs_xcom_proxy_impl.

◆ initialize_network_manager()

virtual bool Gcs_xcom_proxy::initialize_network_manager ( )
pure virtual

Initializes XCom's Network Manager.

This must be called to ensure that we have client connection abilities since the start of GCS.

Returns
true in case of error, false otherwise.

Implemented in Gcs_xcom_proxy_base.

◆ new_node_address_uuid()

virtual node_address * Gcs_xcom_proxy::new_node_address_uuid ( unsigned int  n,
char const *  names[],
blob  uuids[] 
)
pure virtual

This is an utility member function that is used to call into XCom for creating list with node's addresses and their associated UUIDs.

Note that callers must provide the UUID.

Parameters
nThe number of elements in the list
namesThe names to be put on the list
uuidsThe UUIDs to be put on the list
Returns
a pointer to the list containing all the elements needed. The caller is responsible to reclaim memory once he is done with this data delete_node_address

Implemented in Gcs_xcom_proxy_impl.

◆ set_network_manager_active_provider()

virtual bool Gcs_xcom_proxy::set_network_manager_active_provider ( enum_transport_protocol  new_value)
pure virtual

Set XCom's network manager active provider.

Parameters
new_valuethe value of the Communication Stack to use.
Returns
true in case of error, false otherwise.

Implemented in Gcs_xcom_proxy_base.

◆ set_should_exit()

virtual void Gcs_xcom_proxy::set_should_exit ( bool  should_exit)
pure virtual

Function that sets the value that signals that XCom must be forcefully stopped.

Implemented in Gcs_xcom_proxy_impl.

◆ test_xcom_tcp_connection()

virtual bool Gcs_xcom_proxy::test_xcom_tcp_connection ( std::string &  host,
xcom_port  port 
)
pure virtual

Performs a test connection to the given XCom instance via TCP.

Parameters
hostthe XCom instance's host
portthe XCom instance's port
Returns
true if we were able to successfully connect, false otherwise.

Implemented in Gcs_xcom_proxy_base.

◆ xcom_add_node()

virtual bool Gcs_xcom_proxy::xcom_add_node ( connection_descriptor con,
const Gcs_xcom_node_information node,
uint32_t  group_id_hash 
)
pure virtual

Function to add a node to XCOM.

Parameters
conConnection to a node that will carry on the request.
nodeNode information.
group_id_hashHash of group identifier.
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of adding a node. Since this is basically an asynchronous function, one needs to wait for the actual view change to validate that the node was added to the configuration.

Implemented in Gcs_xcom_proxy_base.

◆ xcom_add_nodes()

virtual bool Gcs_xcom_proxy::xcom_add_nodes ( connection_descriptor con,
Gcs_xcom_nodes nodes,
uint32_t  group_id_hash 
)
pure virtual

Function to add a set of nodes to XCOM.

Parameters
conConnection to a node that will carry on the request.
nodesSet of nodes.
group_id_hashHash of group identifier.
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of adding a node. Since this is basically an asynchronous function, one needs to wait for the actual view change to validate that the nodes were added to the configuration.

Implemented in Gcs_xcom_proxy_base.

◆ xcom_boot_node()

virtual bool Gcs_xcom_proxy::xcom_boot_node ( Gcs_xcom_node_information node,
uint32_t  group_id_hash 
)
pure virtual

Function used to boot a node in XCOM.

Parameters
nodeNode information.
group_id_hashHash of group identifier.
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of booting. Since this is basically an asynchronous function, one needs to wait for XCom to signal it is ready to validate whether it booted.

Implemented in Gcs_xcom_proxy_base.

◆ xcom_client_add_node()

virtual bool Gcs_xcom_proxy::xcom_client_add_node ( connection_descriptor fd,
node_list *  nl,
uint32_t  group_id 
)
pure virtual

This member function is responsible to call into XCom consensus and add a node to the group.

The caller is responsible for ensuring that the session has been opened before open_session and also that the node is not yet in the configuration.

The callee must have opened an XCom connection before calling this function. xcom_client_open_connection.

Parameters
fdthe file descriptor to the XCom connection established earlier
nlThe node list containing the list of peers to add
group_idthe identifier of the group to which the nodes should be added
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of adding a node. Since this is basically an asynchronous function, one needs to wait for the actual view change to validate that the node was added to the configuration.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_boot()

virtual bool Gcs_xcom_proxy::xcom_client_boot ( node_list *  nl,
uint32_t  group_id 
)
pure virtual

This member function boots XCom.

Parameters
nlList with a single member - the one that boots the group
group_idthe Group identifier to which the member belongs to
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of booting. Since this is basically an asynchronous function, one needs to wait for XCom to signal it is ready to validate whether it booted.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_close_connection()

virtual bool Gcs_xcom_proxy::xcom_client_close_connection ( connection_descriptor fd)
pure virtual

This member function closes the connection to an XCom instance.

Parameters
fdThe connection file descriptor
Returns
true (false) on success (failure)

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_force_config()

virtual bool Gcs_xcom_proxy::xcom_client_force_config ( node_list *  nl,
uint32_t  group_id 
)
pure virtual

This method forces XCom to inject a new configuration in the group, even if it does not contain a majority of members.

Parameters
nlThe list of nodes that will belong to this new configuration
group_idThe identifier of the group from which the nodes will belong
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of forcing the configuration. Since this is basically an asynchronous function, one needs to wait for the actual view change to validate that the configuration was forced.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_get_event_horizon()

virtual bool Gcs_xcom_proxy::xcom_client_get_event_horizon ( uint32_t  group_id,
xcom_event_horizon &  event_horizon 
)
pure virtual

This member function is responsible for retrieving the event horizon of the XCom configuration.

This function REQUIRES a prior call to xcom_open_handlers to establish a connection to XCom.

Parameters
[in]group_idThe identifier of the group from which the event horizon will be retrieved
[out]event_horizonA reference to where the group's event horizon value will be written to
Return values
trueif successful and event_horizon was written to
falseotherwise

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_get_leaders()

virtual bool Gcs_xcom_proxy::xcom_client_get_leaders ( uint32_t  group_id,
leader_info_data &  leaders 
)
pure virtual

This member function is responsible for retrieving the leaders of the XCom configuration.

Parameters
[in]group_idThe identifier of the group
[out]leadersA reference to where the group's leaders will be written to
Return values
trueif successful and leaders was written to
falseotherwise

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_get_synode_app_data()

virtual bool Gcs_xcom_proxy::xcom_client_get_synode_app_data ( connection_descriptor fd,
uint32_t  group_id,
synode_no_array &  synodes,
synode_app_data_array &  reply 
)
pure virtual

This member function is responsible for retrieving the application payloads decided in the synodes in synodes, from the XCom instance connected to via fd.

Parameters
[in]fdThe file descriptor to the XCom connection established earlier
[in]group_idThe identifier of the group from which the payloads will be retrieved
[in]synodesThe desired synodes
[out]replyWhere the requested payloads will be written to
Returns
true (false) on success (failure). Success means that XCom had the requested payloads, which were written to reply.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_open_connection()

virtual connection_descriptor * Gcs_xcom_proxy::xcom_client_open_connection ( std::string  addr,
xcom_port  port 
)
pure virtual

This member function opens a connection to an XCom instance.

Parameters
addrThe XCom instance address
portThe XCom instance port
Returns
a valid file descriptor on success, -1 otherwise

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_remove_node() [1/2]

virtual bool Gcs_xcom_proxy::xcom_client_remove_node ( connection_descriptor fd,
node_list *  nl,
uint32_t  group_id 
)
pure virtual

This member function is responsible for triggering the removal of a node from the XCom configuration.

This function is asynchronous, so you need to wait for the view change to actually validate that the removal was successful.

The caller is responsible for making sure that the server to be removed is in the group.

The callee must have opened an XCom connection before calling this function. xcom_client_open_connection.

Parameters
fdthe file descriptor to the XCom connection established earlier
nlThe list of nodes to remove from the group
group_idThe identifier of the group from which the nodes will be removed
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of removing a node. Since this is basically an asynchronous function, one needs to wait for the actual view change to validate that the nodes were removed from the configuration.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_remove_node() [2/2]

virtual bool Gcs_xcom_proxy::xcom_client_remove_node ( node_list *  nl,
uint32_t  group_id 
)
pure virtual

This member function is responsible for triggering the removal of a node from the XCom configuration.

This function is asynchronous, so you need to wait for the view change to actually validate that the removal was successful.

The caller is responsible for making sure that the server to be removed is in the group.

This function MUST be called after opening the local XCom session xcom_input_connect.

Parameters
nlThe list of nodes to remove from the group
group_idThe identifier of the group from which the nodes will be removed
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of removing a node. Since this is basically an asynchronous function, one needs to wait for the actual view change to validate that the nodes were removed from the configuration.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_send_data()

virtual bool Gcs_xcom_proxy::xcom_client_send_data ( unsigned long long  size,
char *  data 
)
pure virtual

This member function is responsible for pushing data into consensus on XCom.

The caller is responsible to making sure that there is an open XCom session xcom_input_connect and also that the server is part of the XCom configuration before sending data to it.

data must have been allocated by one of the functions of the malloc family, because data will be passed on to XCom. XCom is implemented in C and will use free to dispose of data when it is finished with data.

This function takes ownership of data. This means that this function becomes responsible for the lifetime of data. Since this function takes ownership of data, the caller must not interact with data after passing it to this function.

Parameters
sizethe size of the payload
datathe payload
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_set_cache_size()

virtual bool Gcs_xcom_proxy::xcom_client_set_cache_size ( uint64_t  size)
pure virtual

This member function is responsible for setting a new value for the maximum size of the XCom cache.

This function is asynchronous, so the return value indicates only whether the request to change the value was successfully pushed to XCom or not. However, since the cache size is set only for the local node, and makes no further verifications on the value, if XCom processes the request, it will accept the new value. The callers of this function must validate that the value set is within the limits set to the maximum size of the XCom cache.

This function REQUIRES a prior call to xcom_open_handlers to establish a connection to XCom.

Parameters
sizeThe new value for the maximum size of the XCom cache.
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_set_event_horizon()

virtual bool Gcs_xcom_proxy::xcom_client_set_event_horizon ( uint32_t  group_id,
xcom_event_horizon  event_horizon 
)
pure virtual

This member function is responsible for triggering the reconfiguration of the event horizon of the XCom configuration.

This function is asynchronous, so you need to poll xcom_get_event_horizon to actually validate that the reconfiguration was successful.

This function REQUIRES a prior call to xcom_open_handlers to establish a connection to XCom.

Parameters
event_horizonThe desired event horizon value
group_idThe identifier of the group from which the nodes will be removed
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of setting the event horizon. Since this is basically an asynchronous function, one needs to busy-wait on xcom_client_get_event_horizon to validate that the event horizon was modified.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_client_set_leaders()

virtual bool Gcs_xcom_proxy::xcom_client_set_leaders ( uint32_t  group_id,
u_int  nr_preferred_leaders,
char const *  preferred_leaders[],
node_no  max_nr_leaders 
)
pure virtual

This member function is responsible for triggering the reconfiguration of the leaders of the XCom configuration.

This function is asynchronous, so you need to poll xcom_get_leaders to actually validate that the reconfiguration was successful.

Parameters
group_idThe identifier of the group
nr_preferred_leadersNumber of preferred leaders, i.e. elements in preferred_leaders
preferred_leadersThe "host:port" of the preferred leaders
max_nr_leadersMaximum number of active leaders
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of setting the leaders. Since this is basically an asynchronous function, one needs to busy-wait on xcom_client_get_leaders to validate that the leaders were modified.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_destroy_ssl()

virtual void Gcs_xcom_proxy::xcom_destroy_ssl ( )
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_exit()

virtual void Gcs_xcom_proxy::xcom_exit ( )
pure virtual

This member function finishes the XCom thread.

This function must be called when the XCOM thread was started but the node has not joined a group.

There could be errors later in the process of exiting XCom. Since this is basically an asynchronous function, one needs to wait for the XCom thread to to ensure that XCom terminated.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_force_nodes()

virtual bool Gcs_xcom_proxy::xcom_force_nodes ( Gcs_xcom_nodes nodes,
unsigned int  group_id_hash 
)
pure virtual

Function to force the set of nodes in XCOM's configuration.

Parameters
nodesSet of nodes.
group_id_hashHash of group identifier.
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of forcing the configuration. Since this is basically an asynchronous function, one needs to wait for the actual view change to validate that the configuration was forced.

◆ xcom_get_event_horizon()

virtual bool Gcs_xcom_proxy::xcom_get_event_horizon ( uint32_t  group_id_hash,
xcom_event_horizon &  event_horizon 
)
pure virtual

Function to retrieve XCOM's event horizon.

Parameters
[in]group_id_hashHash of group identifier.
[out]event_horizonA reference to where the group's event horizon value will be written to
Returns
true if successful, false otherwise

Implemented in Gcs_xcom_proxy_base.

◆ xcom_get_leaders()

virtual bool Gcs_xcom_proxy::xcom_get_leaders ( uint32_t  group_id_hash,
leader_info_data &  leaders 
)
pure virtual

Implemented in Gcs_xcom_proxy_base.

◆ xcom_get_maximum_event_horizon()

virtual xcom_event_horizon Gcs_xcom_proxy::xcom_get_maximum_event_horizon ( )
pure virtual

Function to retrieve XCOM's maximum supported event horizon value.

Implemented in Gcs_xcom_proxy_base.

◆ xcom_get_minimum_event_horizon()

virtual xcom_event_horizon Gcs_xcom_proxy::xcom_get_minimum_event_horizon ( )
pure virtual

Function to retrieve XCOM's minimum supported event horizon value.

Implemented in Gcs_xcom_proxy_base.

◆ xcom_get_ssl_fips_mode()

virtual int Gcs_xcom_proxy::xcom_get_ssl_fips_mode ( const char *  mode)
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_get_ssl_mode()

virtual int Gcs_xcom_proxy::xcom_get_ssl_mode ( const char *  mode)
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_get_synode_app_data()

virtual bool Gcs_xcom_proxy::xcom_get_synode_app_data ( Gcs_xcom_node_information const &  xcom_instance,
uint32_t  group_id_hash,
const std::unordered_set< Gcs_xcom_synode > &  synode_set,
synode_app_data_array &  reply 
)
pure virtual

Function to retrieve the application payloads decided on a set of synodes.

Parameters
[in]xcom_instanceThe XCom instance to connect to
[in]group_id_hashHash of group identifier.
[in]synode_setThe desired synodes
[out]replyWhere the requested payloads will be written to
Returns
true (false) on success (failure). Success means that XCom had the requested payloads, which were written to reply.

Implemented in Gcs_xcom_proxy_base.

◆ xcom_has_comms_status_changed()

virtual bool Gcs_xcom_proxy::xcom_has_comms_status_changed ( )
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_init()

virtual void Gcs_xcom_proxy::xcom_init ( xcom_port  listen_port)
pure virtual

This member function initializes XCom.

This function must be called before anything else and from within the XCom thread. It will eventually call the main loop inside XCom.

Parameters
listen_portthe port that the local XCom is to be listening on.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_init_ssl()

virtual bool Gcs_xcom_proxy::xcom_init_ssl ( )
pure virtual

Initialize the SSL.

Returns
true on error. False otherwise.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_input_connect()

virtual bool Gcs_xcom_proxy::xcom_input_connect ( std::string const &  address,
xcom_port  port 
)
pure virtual

Opens the input channel to XCom.

Parameters
addressaddress to connect to
portport to connect to
Return values
trueif successful
falseotherwise

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_input_disconnect()

virtual void Gcs_xcom_proxy::xcom_input_disconnect ( )
pure virtual

Closes the input channel to XCom.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_input_try_pop()

virtual xcom_input_request_ptr Gcs_xcom_proxy::xcom_input_try_pop ( )
pure virtual

Attempts to retrieve incoming commands.

(Called by XCom.)

Precondition
The input channel to XCom is open, i.e. xcom_input_connect
Return values
app_data_ptrlinked list of the queued commands if the queue is not empty
nullptrif the queue is empty

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_input_try_push()

virtual bool Gcs_xcom_proxy::xcom_input_try_push ( app_data_ptr  data)
pure virtual

Attempts to send the command data to XCom.

(Called by GCS.)

The function takes ownership of data.

Precondition
The input channel to XCom is open, i.e. xcom_input_connect
Parameters
datathe command to send to XCom
Return values
trueif the command was sent to XCom
falseif the command was not sent to XCom

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_input_try_push_and_get_reply()

virtual Gcs_xcom_input_queue::future_reply Gcs_xcom_proxy::xcom_input_try_push_and_get_reply ( app_data_ptr  data)
pure virtual

Attempts to send the command data to XCom, and returns a future to XCom's reply.

(Called by GCS.)

The function takes ownership of data.

Precondition
The input channel to XCom is open, i.e. xcom_input_connect
Parameters
datathe command to send to XCom
Returns
a future pointer to a Reply object if successful, a future pointer to nullptr otherwise

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_is_exit()

virtual bool Gcs_xcom_proxy::xcom_is_exit ( )
pure virtual

This verifies if XCom has finished or not.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_is_ready()

virtual bool Gcs_xcom_proxy::xcom_is_ready ( )
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_remove_node()

virtual bool Gcs_xcom_proxy::xcom_remove_node ( const Gcs_xcom_node_information node,
uint32_t  group_id_hash 
)
pure virtual

Function to remove a node from XCOM.

Parameters
nodeNode information.
group_id_hashHash of group identifier.
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of removing a node. Since this is basically an asynchronous function, one needs to wait for the actual view change to validate that the node was removed from the configuration.

Implemented in Gcs_xcom_proxy_base.

◆ xcom_remove_nodes() [1/2]

virtual bool Gcs_xcom_proxy::xcom_remove_nodes ( connection_descriptor con,
Gcs_xcom_nodes nodes,
uint32_t  group_id_hash 
)
pure virtual

Function to remove a set of nodes from XCOM.

Parameters
conConnection to a node that will carry on the request.
nodesSet of nodes to remove.
group_id_hashHash of group identifier.
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of removing a node. Since this is basically an asynchronous function, one needs to wait for the actual view change to validate that the nodes were removed from the configuration.

Implemented in Gcs_xcom_proxy_base.

◆ xcom_remove_nodes() [2/2]

virtual bool Gcs_xcom_proxy::xcom_remove_nodes ( Gcs_xcom_nodes nodes,
uint32_t  group_id_hash 
)
pure virtual

Function to remove a set of nodes from XCOM.

Parameters
nodesSet of nodes.
group_id_hashHash of group identifier.
Returns
true (false) on success (failure). Success means that XCom will process our request, failure means it won't. There could be errors later in the process of removing a node. Since this is basically an asynchronous function, one needs to wait for the actual view change to validate that the nodes were removed from the configuration.

Implemented in Gcs_xcom_proxy_base.

◆ xcom_set_cache_size()

virtual bool Gcs_xcom_proxy::xcom_set_cache_size ( uint64_t  size)
pure virtual

Function to reconfigure the maximum size of the XCom cache.

Parameters
sizeCache size limit.
Returns
true if the operation is successfully pushed to XCom's queue, false otherwise

Implemented in Gcs_xcom_proxy_base.

◆ xcom_set_cleanup()

virtual void Gcs_xcom_proxy::xcom_set_cleanup ( )
pure virtual

Clean up variables used to notify states in the XCOM's state machine.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_set_comms_status()

virtual void Gcs_xcom_proxy::xcom_set_comms_status ( int  status)
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_set_event_horizon()

virtual bool Gcs_xcom_proxy::xcom_set_event_horizon ( uint32_t  group_id_hash,
xcom_event_horizon  event_horizon 
)
pure virtual

Function to reconfigure XCOM's event horizon.

Parameters
group_id_hashHash of group identifier.
event_horizonDesired event horizon value.
Returns
true if successful, false otherwise

Implemented in Gcs_xcom_proxy_base.

◆ xcom_set_exit()

virtual void Gcs_xcom_proxy::xcom_set_exit ( bool  value)
pure virtual

This sets whether XCom has finished or not.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_set_leaders()

virtual bool Gcs_xcom_proxy::xcom_set_leaders ( uint32_t  group_id_hash,
u_int  nr_preferred_leaders,
char const *  preferred_leaders[],
node_no  max_nr_leaders 
)
pure virtual

Implemented in Gcs_xcom_proxy_base.

◆ xcom_set_ready()

virtual void Gcs_xcom_proxy::xcom_set_ready ( bool  value)
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_set_ssl_fips_mode()

virtual int Gcs_xcom_proxy::xcom_set_ssl_fips_mode ( int  mode)
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_set_ssl_mode()

virtual int Gcs_xcom_proxy::xcom_set_ssl_mode ( int  mode)
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_set_ssl_parameters()

virtual void Gcs_xcom_proxy::xcom_set_ssl_parameters ( ssl_parameters  ssl,
tls_parameters  tls 
)
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_signal_comms_status_changed()

virtual void Gcs_xcom_proxy::xcom_signal_comms_status_changed ( int  status)
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_signal_exit()

virtual void Gcs_xcom_proxy::xcom_signal_exit ( )
pure virtual

This modifies the internal cached status and signals all threads that might be waiting on xcom_wait_exit.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_signal_ready()

virtual void Gcs_xcom_proxy::xcom_signal_ready ( )
pure virtual

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_use_ssl()

virtual bool Gcs_xcom_proxy::xcom_use_ssl ( )
pure virtual

Return whether the SSL will be used to encrypt data or not.

Returns
true (false) if XCom will (not) use SSL

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_wait_exit()

virtual enum_gcs_error Gcs_xcom_proxy::xcom_wait_exit ( )
pure virtual

Call this method to wait for XCom to exit.

Call this method to wait for XCom to exit. It will block until XCom has exit or an error occurs.

Returns
GCS_OK if success, otherwise GCS_NOK.

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_wait_for_xcom_comms_status_change()

virtual void Gcs_xcom_proxy::xcom_wait_for_xcom_comms_status_change ( int &  status)
pure virtual

Call this method to wait for XCom communications to be initialized.

Call this method to wait for XCom communications to be initialized. It will block until XCom communications are either OK or error out. The value of the status (XCOM_COMMS_OK or XCOM_COMMS_ERROR) is written into the status out parameters.

Parameters
[out]statusvalue of the XCom communication layer status. It can be either XCOM_COMMS_OK or XCOM_COMMS_ERROR

Implemented in Gcs_xcom_proxy_impl.

◆ xcom_wait_ready()

virtual enum_gcs_error Gcs_xcom_proxy::xcom_wait_ready ( )
pure virtual

This member waits for XCom to be initialized.

Implemented in Gcs_xcom_proxy_impl.


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