MySQL 9.2.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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
 
const rapidjson::Document & routing_guidelines_document () const
 
rapidjson::Document routing_guidelines_document_schema () const
 
std::vector< std::string > route_names () const
 
void set_routing_guidelines (const std::string &routing_guidelines_document)
 
bool routing_guidelines_initialized () const
 
std::shared_ptr< routing_guidelines::Routing_guidelines_engineget_routing_guidelines ()
 
MySQLRoutingConnectionBaseget_connection (const std::string &client_endpoint)
 

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}
 
std::mutex routing_guidelines_mtx_
 
std::shared_ptr< routing_guidelines::Routing_guidelines_enginerouting_guidelines_ {nullptr}
 

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 &  client_endpoint)

◆ get_instance()

MySQLRoutingComponent & MySQLRoutingComponent::get_instance ( )
static

◆ get_routing_guidelines()

std::shared_ptr< routing_guidelines::Routing_guidelines_engine > MySQLRoutingComponent::get_routing_guidelines ( )
inline

◆ 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

◆ routing_guidelines_document()

const rapidjson::Document & MySQLRoutingComponent::routing_guidelines_document ( ) const

◆ routing_guidelines_document_schema()

rapidjson::Document MySQLRoutingComponent::routing_guidelines_document_schema ( ) const

◆ routing_guidelines_initialized()

bool MySQLRoutingComponent::routing_guidelines_initialized ( ) const

◆ set_routing_guidelines()

void MySQLRoutingComponent::set_routing_guidelines ( const std::string &  routing_guidelines_document)

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

◆ routing_guidelines_

std::shared_ptr<routing_guidelines::Routing_guidelines_engine> MySQLRoutingComponent::routing_guidelines_ {nullptr}
private

◆ routing_guidelines_mtx_

std::mutex MySQLRoutingComponent::routing_guidelines_mtx_
mutableprivate

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