MySQL 8.4.2
Source Code Documentation
|
Abstraction layer that adds XCom specific methods to the generic communication interface. More...
#include <gcs_xcom_communication_interface.h>
Public Member Functions | |
virtual enum_gcs_error | do_send_message (const Gcs_message &message_to_send, unsigned long long *message_length, Cargo_type cargo)=0 |
Sends a message that is internal to the binding implementation. More... | |
virtual Gcs_message_pipeline & | get_msg_pipeline ()=0 |
virtual void | buffer_incoming_packet (Gcs_packet &&packet, std::unique_ptr< Gcs_xcom_nodes > &&xcom_nodes)=0 |
Buffer packets when a view is not installed yet and the state exchange phase is being executed. More... | |
virtual void | deliver_buffered_packets ()=0 |
The state exchange phase has been executed and the view has been installed so this is used to send any buffered packet to upper layers. More... | |
virtual void | cleanup_buffered_packets ()=0 |
virtual size_t | number_buffered_packets ()=0 |
Return the number of buffered packets. More... | |
virtual void | update_members_information (const Gcs_member_identifier &me, const Gcs_xcom_nodes &members)=0 |
Notify the pipeline about the new XCom membership when a state exchange begins. More... | |
virtual bool | recover_packets (Gcs_xcom_synode_set const &synodes)=0 |
Attempts to recover the missing packets that are required for a node to join the group successfully. More... | |
virtual Gcs_message * | convert_packet_to_message (Gcs_packet &&packet, std::unique_ptr< Gcs_xcom_nodes > &&xcom_nodes)=0 |
Converts the packet into a message that can be delivered to the upper layer. More... | |
virtual void | process_user_data_packet (Gcs_packet &&packet, std::unique_ptr< Gcs_xcom_nodes > &&xcom_nodes)=0 |
The purpose of this method is to be called when in Gcs_xcom_interface callback method xcom_receive_data is invoked. More... | |
~Gcs_xcom_communication_interface () override=default | |
Public Member Functions inherited from Gcs_communication_interface | |
virtual enum_gcs_error | send_message (const Gcs_message &message_to_send)=0 |
Method used to broadcast a message to a group in which this interface pertains. More... | |
virtual int | add_event_listener (const Gcs_communication_event_listener &event_listener)=0 |
Registers an implementation of a Gcs_communication_event_listener that will receive Communication Events. More... | |
virtual void | remove_event_listener (int event_listener_handle)=0 |
Removes a previously registered event listener. More... | |
virtual Gcs_protocol_version | get_protocol_version () const =0 |
Retrieves the current GCS protocol version in use. More... | |
virtual std::pair< bool, std::future< void > > | set_protocol_version (Gcs_protocol_version new_version)=0 |
Modifies the GCS protocol version in use. More... | |
virtual Gcs_protocol_version | get_maximum_supported_protocol_version () const =0 |
Get the maximum protocol version currently supported by the group. More... | |
virtual void | set_communication_protocol (enum_transport_protocol protocol)=0 |
Sets the communication protocol to use. More... | |
virtual enum_transport_protocol | get_incoming_connections_protocol ()=0 |
Get the incoming connections protocol which is currently active. More... | |
virtual | ~Gcs_communication_interface ()=default |
Abstraction layer that adds XCom specific methods to the generic communication interface.
Implementation of the Gcs_communication_interface for xcom.
This adds the following functionalities to the generic Gcs_communication_interface:
|
overridedefault |
|
pure virtual |
Buffer packets when a view is not installed yet and the state exchange phase is being executed.
Note that this method must be executed by the same thread that processes global view messages and data message in order to avoid any concurrency issue.
packet | Packet to buffer. |
xcom_nodes | Membership at the time the packet was received |
Implemented in Gcs_xcom_communication.
|
pure virtual |
Implemented in Gcs_xcom_communication.
|
pure virtual |
Converts the packet into a message that can be delivered to the upper layer.
packet | The packet to convert |
xcom_nodes | The membership at the time the packet was delivered |
Gcs_message* | if successful |
nullptr | if unsuccessful |
Implemented in Gcs_xcom_communication.
|
pure virtual |
The state exchange phase has been executed and the view has been installed so this is used to send any buffered packet to upper layers.
Note that this method must be executed by the same thread that processes global view messages and data message in order to avoid any concurrency issue.
Implemented in Gcs_xcom_communication.
|
pure virtual |
Sends a message that is internal to the binding implementation.
This message will not be subject to the same restrictions of send_message. As such, it will not observe view safety nor will count for the statistics of messages sent.
[in] | message_to_send | the message to send |
[out] | message_length | the length of message which was send if GCS_OK, unspecified otherwise |
[in] | cargo | internal message header cargo type |
GCS_OK | message is transmitted successfully |
GCS_NOK | error occurred while transmitting message |
GCS_MESSAGE_TOO_BIG | message is bigger then xcom can handle |
Implemented in Gcs_xcom_communication.
|
pure virtual |
Implemented in Gcs_xcom_communication.
|
pure virtual |
Return the number of buffered packets.
Note that this method must be executed by the same thread that processes global view messages and data message in order to avoid any concurrency issue.
Implemented in Gcs_xcom_communication.
|
pure virtual |
The purpose of this method is to be called when in Gcs_xcom_interface callback method xcom_receive_data is invoked.
This allows, in terms of software architecture, to concentrate all the message delivery logic and processing in a single place.
The deliver_message callback that is registered in XCom (in gcs_xcom_interface.h) and that actually receives the low-level messages, is implemented as a delegator to this method.
Note that the method will be responsible for deleting the message passed as parameter and must be executed by the same thread that processes global view messages and data message in order to avoid any concurrency issue.
Implemented in Gcs_xcom_communication.
|
pure virtual |
Attempts to recover the missing packets that are required for a node to join the group successfully.
For example, the missing packets may be some fragments of a message that have already been delivered by XCom to the existing members of the group. The joining node needs those fragments in order to be able to deliver the reassembled message when the final fragments are delivered by XCom.
Note that this method must be executed by the same thread that processes global view messages and data message in order to avoid any concurrency issue.
synodes | The synodes where the required packets were decided |
Implemented in Gcs_xcom_communication.
|
pure virtual |
Notify the pipeline about the new XCom membership when a state exchange begins.
Note that this method must be executed by the same thread that processes global view messages and data message in order to avoid any concurrency issue.
me | The identifier of this server |
members | The XCom membership |
Implemented in Gcs_xcom_communication.