MySQL 8.0.39
Source Code Documentation
MysqlRoutingClassicConnection Class Reference

#include <classic_connection.h>

Inheritance diagram for MysqlRoutingClassicConnection:
[legend]

Public Member Functions

void async_run () 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
 
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)
 
ClassicProtocolStateclient_protocol ()
 
const ClassicProtocolStateclient_protocol () const
 
ClassicProtocolStateserver_protocol ()
 
const ClassicProtocolStateserver_protocol () const
 
const ProtocolSplicerBasesocket_splicer () const
 
ProtocolSplicerBasesocket_splicer ()
 
std::string get_destination_id () const override
 
void destination_id (const std::string &id)
 
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...
 
bool greeting_from_router () const
 if the router is sending the initial server-greeting. More...
 
void requires_tls (bool v)
 
bool requires_tls () const
 
void some_state_changed (bool v)
 
RouteDestinationdestinations ()
 
Destinationscurrent_destinations ()
 
void collation_connection_maybe_dirty (bool val)
 
bool collation_connection_maybe_dirty () 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
 
void recv_from_either (FromEither v)
 
FromEither recv_from_either () 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 }
 
- 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 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

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