MySQL 8.4.0
Source Code Documentation
MySQLRoutingComponent Class Reference

#include <routing_component.h>

Public Member Functions

void deinit ()
 
void init (const mysql_harness::Config &config)
 
void register_route (const std::string &name, std::shared_ptr< MySQLRoutingBase > srv)
 
void erase (const std::string &name)
 
MySQLRoutingAPI api (const std::string &name)
 
uint64_t current_total_connections ()
 
uint64_t max_total_connections () const
 
MySQLRoutingConnectionBaseget_connection (const std::string &ep)
 
std::vector< std::string > route_names () const
 

Static Public Member Functions

static MySQLRoutingComponentget_instance ()
 

Private Member Functions

 MySQLRoutingComponent (MySQLRoutingComponent const &)=delete
 
void operator= (MySQLRoutingComponent const &)=delete
 
 MySQLRoutingComponent ()=default
 

Private Attributes

std::mutex routes_mu_
 
std::map< std::string, std::weak_ptr< MySQLRoutingBase > > routes_
 
uint64_t max_total_connections_ {0}
 

Constructor & Destructor Documentation

◆ MySQLRoutingComponent() [1/2]

MySQLRoutingComponent::MySQLRoutingComponent ( MySQLRoutingComponent const &  )
privatedelete

◆ MySQLRoutingComponent() [2/2]

MySQLRoutingComponent::MySQLRoutingComponent ( )
privatedefault

Member Function Documentation

◆ api()

MySQLRoutingAPI MySQLRoutingComponent::api ( const std::string &  name)

◆ current_total_connections()

uint64_t MySQLRoutingComponent::current_total_connections ( )

◆ deinit()

void MySQLRoutingComponent::deinit ( )

◆ erase()

void MySQLRoutingComponent::erase ( const std::string &  name)

◆ get_connection()

MySQLRoutingConnectionBase * MySQLRoutingComponent::get_connection ( const std::string &  ep)

◆ get_instance()

MySQLRoutingComponent & MySQLRoutingComponent::get_instance ( )
static

◆ init()

void MySQLRoutingComponent::init ( const mysql_harness::Config config)

◆ max_total_connections()

uint64_t MySQLRoutingComponent::max_total_connections ( ) const
inline

◆ operator=()

void MySQLRoutingComponent::operator= ( MySQLRoutingComponent const &  )
privatedelete

◆ register_route()

void MySQLRoutingComponent::register_route ( const std::string &  name,
std::shared_ptr< MySQLRoutingBase srv 
)

◆ route_names()

std::vector< std::string > MySQLRoutingComponent::route_names ( ) const

Member Data Documentation

◆ max_total_connections_

uint64_t MySQLRoutingComponent::max_total_connections_ {0}
private

◆ routes_

std::map<std::string, std::weak_ptr<MySQLRoutingBase> > MySQLRoutingComponent::routes_
private

◆ routes_mu_

std::mutex MySQLRoutingComponent::routes_mu_
private

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