MySQL 8.4.2
Source Code Documentation
MysqlRoutingClassicConnection Class Reference

#include <classic_connection.h>

Inheritance diagram for MysqlRoutingClassicConnection:
[legend]

Public Member Functions

void async_run () override
 
void stash_server_conn () override
 
- Public Member Functions inherited from MysqlRoutingClassicConnectionBase
std::shared_ptr< MysqlRoutingClassicConnectionBasegetptr ()
 
void on_handshake_received ()
 
void on_handshake_aborted ()
 
SslMode source_ssl_mode () const
 
SslMode dest_ssl_mode () const
 
net::impl::socket::native_handle_type get_client_fd () const override
 
std::string get_client_address () const override
 Returns address of client which connected to router. More...
 
std::string get_server_address () const override
 Returns address of server to which connection is established. More...
 
void disconnect () override
 
void send_server_failed (std::error_code ec, bool call_finish=true)
 
void recv_server_failed (std::error_code ec, bool call_finish=true)
 
void send_client_failed (std::error_code ec, bool call_finish=true)
 
void recv_client_failed (std::error_code ec, bool call_finish=true)
 
void server_socket_failed (std::error_code ec, bool call_finish=true)
 
virtual void client_socket_failed (std::error_code ec, bool call_finish=true)
 
void resume ()
 
void push_processor (std::unique_ptr< BasicProcessor > processor)
 
void pop_processor ()
 
stdx::expected< void, std::error_code > track_session_changes (net::const_buffer session_trackers, classic_protocol::capabilities::value_type caps, bool ignore_some_state_changed=false)
 
void reset_to_initial ()
 reset the connection's settings to the initial-values. More...
 
ClientSideConnection::protocol_state_typeclient_protocol ()
 
const ClientSideConnection::protocol_state_typeclient_protocol () const
 
ServerSideConnection::protocol_state_typeserver_protocol ()
 
const ServerSideConnection::protocol_state_typeserver_protocol () const
 
ClientSideConnectionclient_conn ()
 
const ClientSideConnectionclient_conn () const
 
ServerSideConnectionserver_conn ()
 
const ServerSideConnectionserver_conn () const
 
std::string get_destination_id () const override
 
void destination_id (const std::string &id)
 
std::string read_only_destination_id () const override
 
void read_only_destination_id (const std::string &destination_id)
 
std::string read_write_destination_id () const override
 
void read_write_destination_id (const std::string &destination_id)
 
std::optional< net::ip::tcp::endpointdestination_endpoint () const override
 
void destination_endpoint (const std::optional< net::ip::tcp::endpoint > &ep)
 
std::optional< net::ip::tcp::endpointread_only_destination_endpoint () const override
 
void read_only_destination_endpoint (const std::optional< net::ip::tcp::endpoint > &ep)
 
std::optional< net::ip::tcp::endpointread_write_destination_endpoint () const override
 
void read_write_destination_endpoint (const std::optional< net::ip::tcp::endpoint > &ep)
 
bool authenticated () const
 check if the connection is authenticated. More...
 
void authenticated (bool v)
 
bool connection_sharing_possible () const
 check if connection sharing is possible. More...
 
bool connection_sharing_allowed () const
 check if connection sharing is allowed. More...
 
void connection_sharing_allowed_reset ()
 reset the connection-sharing state. More...
 
std::string connection_sharing_blocked_by () const
 
bool greeting_from_router () const
 if the router is sending the initial server-greeting. More...
 
void requires_tls (bool v)
 set if the server-connection requires TLS More...
 
bool requires_tls () const
 get if the server-connection requires TLS More...
 
void requires_client_cert (bool v)
 set if the server-connection requires a client cert More...
 
bool requires_client_cert () const
 get if the server-connection requires a client cert More...
 
void some_state_changed (bool v)
 
void expected_server_mode (mysqlrouter::ServerMode v)
 
mysqlrouter::ServerMode expected_server_mode () const
 
void wait_for_my_writes (bool v)
 
bool wait_for_my_writes () const
 
void gtid_at_least_executed (const std::string &gtid)
 
std::string gtid_at_least_executed () const
 
std::chrono::seconds wait_for_my_writes_timeout () const
 
void wait_for_my_writes_timeout (std::chrono::seconds timeout)
 
RouteDestinationdestinations ()
 
Destinationscurrent_destinations ()
 
void collation_connection_maybe_dirty (bool val)
 
bool collation_connection_maybe_dirty () const
 
std::optional< classic_protocol::session_track::TransactionCharacteristicstrx_characteristics () const
 
void trx_characteristics (std::optional< classic_protocol::session_track::TransactionCharacteristics > trx_chars)
 
std::optional< classic_protocol::session_track::TransactionStatetrx_state () const
 
ExecutionContextexecution_context ()
 
const ExecutionContextexecution_context () const
 
void trace (Tracer::Event e)
 
Tracertracer ()
 
net::steady_timerread_timer ()
 
net::steady_timerconnect_timer ()
 
void connect_error_code (const std::error_code &ec)
 
std::error_code connect_error_code () const
 
void diagnostic_area_changed (bool diagnostic_area_changed)
 
bool diagnostic_area_changed () const
 
const TraceSpanevents () const
 
TraceSpanevents ()
 
void recv_from_either (FromEither v)
 
FromEither recv_from_either () const
 
void has_transient_error_at_connect (bool val)
 
bool has_transient_error_at_connect () const
 
- Public Member Functions inherited from MySQLRoutingConnectionBase
 MySQLRoutingConnectionBase (MySQLRoutingContext &context, std::function< void(MySQLRoutingConnectionBase *)> remove_callback)
 
virtual ~MySQLRoutingConnectionBase ()=default
 
MySQLRoutingContextcontext ()
 
const MySQLRoutingContextcontext () const
 
std::size_t get_bytes_up () const
 
std::size_t get_bytes_down () const
 
time_point_type get_started () const
 
time_point_type get_connected_to_server () const
 
time_point_type get_last_sent_to_server () const
 
time_point_type get_last_received_from_server () const
 
Stats get_stats () const
 
void transfered_to_server (size_t bytes)
 
void transfered_to_client (size_t bytes)
 
void disassociate ()
 
void accepted ()
 
virtual void connected ()
 
template<class F >
auto disconnect_request (F &&f)
 
bool disconnect_requested () const
 

Static Public Member Functions

template<typename... Args>
static std::shared_ptr< MysqlRoutingClassicConnectionBasecreate (Args &&... args)
 
- Static Public Member Functions inherited from MysqlRoutingClassicConnectionBase
template<typename... Args>
static std::shared_ptr< MysqlRoutingClassicConnectionBasecreate (Args &&... args)
 
static stdx::expected< size_t, std::error_code > encode_error_packet (std::vector< uint8_t > &error_frame, const uint8_t seq_id, const classic_protocol::capabilities::value_type caps, const uint16_t error_code, const std::string &msg, const std::string &sql_state)
 

Private Member Functions

 MysqlRoutingClassicConnection (MySQLRoutingContext &context, RouteDestination *route_destination, std::unique_ptr< ConnectionBase > client_connection, std::unique_ptr< RoutingConnectionBase > client_routing_connection, std::function< void(MySQLRoutingConnectionBase *)> remove_callback)
 

Additional Inherited Members

- Public Types inherited from MysqlRoutingClassicConnectionBase
enum class  FromEither { None , Started , RecvedFromClient , RecvedFromServer }
 
using ClientSideConnection = TlsSwitchableClientConnection< ClientSideClassicProtocolState >
 
using ServerSideConnection = TlsSwitchableConnection< ServerSideClassicProtocolState >
 
- Public Types inherited from MySQLRoutingConnectionBase
using clock_type = std::chrono::system_clock
 
using time_point_type = clock_type::time_point
 
- Protected Types inherited from MysqlRoutingClassicConnectionBase
enum class  Function { kLoop , kFinish }
 
- Protected Member Functions inherited from MysqlRoutingClassicConnectionBase
 MysqlRoutingClassicConnectionBase (MySQLRoutingContext &context, RouteDestination *route_destination, std::unique_ptr< ConnectionBase > client_connection, std::unique_ptr< RoutingConnectionBase > client_routing_connection, std::function< void(MySQLRoutingConnectionBase *)> remove_callback)
 
void call_next_function (Function next)
 
- Protected Member Functions inherited from MySQLRoutingConnectionBase
void log_connection_summary ()
 
- Protected Attributes inherited from MySQLRoutingConnectionBase
MySQLRoutingContextcontext_
 wrapper for common data used by all routing threads More...
 
std::function< void(MySQLRoutingConnectionBase *)> remove_callback_
 callback that is called when thread of execution completes More...
 
Monitor< Statsstats_ {{}}
 
Monitor< bool > disconnect_ {{}}
 

Constructor & Destructor Documentation

◆ MysqlRoutingClassicConnection()

MysqlRoutingClassicConnection::MysqlRoutingClassicConnection ( MySQLRoutingContext context,
RouteDestination route_destination,
std::unique_ptr< ConnectionBase client_connection,
std::unique_ptr< RoutingConnectionBase client_routing_connection,
std::function< void(MySQLRoutingConnectionBase *)>  remove_callback 
)
inlineprivate

Member Function Documentation

◆ async_run()

void MysqlRoutingClassicConnection::async_run ( )
overridevirtual

Reimplemented from MysqlRoutingClassicConnectionBase.

◆ create()

template<typename... Args>
static std::shared_ptr< MysqlRoutingClassicConnectionBase > MysqlRoutingClassicConnection::create ( Args &&...  args)
inlinestatic

◆ stash_server_conn()

void MysqlRoutingClassicConnection::stash_server_conn ( )
overridevirtual

Reimplemented from MysqlRoutingClassicConnectionBase.


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