MySQL 8.0.39
Source Code Documentation
|
Base class for External Network Providers. More...
#include <network_provider.h>
Public Member Functions | |
Network_provider () | |
Network_provider (Network_provider &¶m) | |
Network_provider & | operator= (Network_provider ¶m)=delete |
Network_provider (Network_provider ¶m)=delete | |
virtual | ~Network_provider () |
virtual std::pair< bool, int > | start ()=0 |
Starts the network provider. More... | |
virtual std::pair< bool, int > | stop ()=0 |
Stops the network provider. More... | |
virtual enum_transport_protocol | get_communication_stack () const =0 |
Get the communication stack implemented by this provider. More... | |
virtual bool | configure (const Network_configuration_parameters ¶ms)=0 |
Configures a network provider. More... | |
virtual bool | configure_secure_connections (const Network_configuration_parameters ¶ms)=0 |
Configures the active provider with all things needed to establish SSL connections. More... | |
virtual void | cleanup_secure_connections_context ()=0 |
virtual std::function< void()> | get_secure_connections_context_cleaner () |
virtual bool | finalize_secure_connections_context ()=0 |
virtual std::unique_ptr< Network_connection > | open_connection (const std::string &address, const unsigned short port, const Network_security_credentials &security_credentials, int connection_timeout=default_connection_timeout(), network_provider_dynamic_log_level log_level=network_provider_dynamic_log_level::PROVIDED)=0 |
Opens a new connection to another XCom endpoint served by the same Network provider. More... | |
virtual int | close_connection (const Network_connection &connection)=0 |
Closes an open connection to another XCom endpoint served by the same Network provider. More... | |
void | set_new_connection (Network_connection *connection) |
Lock-free Set connection. More... | |
Network_connection * | get_new_connection () |
Get the new connection object. More... | |
void | reset_new_connection () |
Static Public Member Functions | |
static constexpr int | default_connection_timeout () |
Private Attributes | |
std::atomic< Network_connection * > | m_shared_connection |
Base class for External Network Providers.
This virtual class will serve as base class for any external entity that whishes to provide network connections to XCom.
It will have to implement the following methods:
If provides a lock free implementation of (set)(get)_connection() for multithreaded usage.
|
inline |
|
inline |
|
delete |
|
inlinevirtual |
|
pure virtual |
Implemented in Gcs_mysql_network_provider, and Xcom_network_provider.
|
pure virtual |
Closes an open connection to another XCom endpoint served by the same Network provider.
connection | an open and valid connection |
Implemented in Gcs_mysql_network_provider, and Xcom_network_provider.
|
pure virtual |
Configures a network provider.
params | a sensible list of possibly configurable network parameters |
Implemented in Gcs_mysql_network_provider, and Xcom_network_provider.
|
pure virtual |
Configures the active provider with all things needed to establish SSL connections.
params | configuration parameters for SSL. |
Implemented in Gcs_mysql_network_provider, and Xcom_network_provider.
|
inlinestaticconstexpr |
|
pure virtual |
Implemented in Gcs_mysql_network_provider, and Xcom_network_provider.
|
pure virtual |
Get the communication stack implemented by this provider.
Return a valid value withint the range of RunningProtocol enum.
Implemented in Gcs_mysql_network_provider, and Xcom_network_provider.
|
inline |
Get the new connection object.
|
inlinevirtual |
|
pure virtual |
Opens a new connection to another XCom endpoint served by the same Network provider.
address | address of the remote endpoint |
port | port of the remote endpoint |
security_credentials | security credentials to connect to the remote endpoint |
connection_timeout | connection timeout |
log_level | log level |
Implemented in Gcs_mysql_network_provider, and Xcom_network_provider.
|
delete |
|
inline |
|
inline |
Lock-free Set connection.
Sets a new connection received by this provider. It will be consumed internally by get_new_connection().
connection | a newly created connection. |
|
pure virtual |
Starts the network provider.
Each implementation will place here any code that it needs to start a network provider.
start() is synchronous. After start() succeeded, it is assumed that XCom is ready to receive new connections.
Implemented in Gcs_mysql_network_provider, and Xcom_network_provider.
|
pure virtual |
Stops the network provider.
Each implementation will place here any code that it needs to stop a network provider.
stop() is synchronous. After stop() succeeded, it is assumed that XCom shall not receive any new connection.
Implemented in Gcs_mysql_network_provider, and Xcom_network_provider.
|
private |