MySQL 9.3.0
Source Code Documentation
Destination Class Reference

Destination to forward client connections to. More...

#include <destination.h>

Classes

struct  Guidelines_route_info
 

Public Member Functions

 Destination (mysql_harness::Destination dest, routing_guidelines::Server_info server_info, std::string routing_guidelines_route_name, const std::optional< bool > connection_sharing_allowed=std::nullopt)
 
 Destination ()=default
 
 Destination (const Destination &)=default
 
Destinationoperator= (const Destination &)=default
 
 Destination (Destination &&)=default
 
Destinationoperator= (Destination &&)=default
 
virtual ~Destination ()=default
 
const mysql_harness::Destinationdestination () const
 
const std::string & server_uuid () const
 Get server UUID. More...
 
const routing_guidelines::Server_infoget_server_info () const
 Get server information. More...
 
const std::string & route_name () const
 Get name of the route that was used to reach this destination. More...
 
void set_route_name (std::string name)
 Set name of the route that was used to reach this destination. More...
 
virtual mysqlrouter::ServerMode server_mode () const
 server-mode of the destination. More...
 
const Guidelines_route_infoguidelines_route_info () const
 
void disable_connection_sharing ()
 Disable connection sharing if sharing prerequisites cannot be met. More...
 

Private Attributes

std::optional< mysql_harness::Destinationdest_
 
routing_guidelines::Server_info server_info_ {}
 
Guidelines_route_info guidelines_route_info_
 

Detailed Description

Destination to forward client connections to.

It is used between the DestinationManager implementations and MySQLRouting

Constructor & Destructor Documentation

◆ Destination() [1/4]

Destination::Destination ( mysql_harness::Destination  dest,
routing_guidelines::Server_info  server_info,
std::string  routing_guidelines_route_name,
const std::optional< bool >  connection_sharing_allowed = std::nullopt 
)
inline

◆ Destination() [2/4]

Destination::Destination ( )
default

◆ Destination() [3/4]

Destination::Destination ( const Destination )
default

◆ Destination() [4/4]

Destination::Destination ( Destination &&  )
default

◆ ~Destination()

virtual Destination::~Destination ( )
virtualdefault

Member Function Documentation

◆ destination()

const mysql_harness::Destination & Destination::destination ( ) const
inline

◆ disable_connection_sharing()

void Destination::disable_connection_sharing ( )
inline

Disable connection sharing if sharing prerequisites cannot be met.

◆ get_server_info()

const routing_guidelines::Server_info & Destination::get_server_info ( ) const
inline

Get server information.

◆ guidelines_route_info()

const Guidelines_route_info & Destination::guidelines_route_info ( ) const
inline

◆ operator=() [1/2]

Destination & Destination::operator= ( const Destination )
default

◆ operator=() [2/2]

Destination & Destination::operator= ( Destination &&  )
default

◆ route_name()

const std::string & Destination::route_name ( ) const
inline

Get name of the route that was used to reach this destination.

Returns
route name

◆ server_mode()

mysqlrouter::ServerMode Destination::server_mode ( ) const
virtual

server-mode of the destination.

may be: unavailable, read-only or read-write.

◆ server_uuid()

const std::string & Destination::server_uuid ( ) const
inline

Get server UUID.

◆ set_route_name()

void Destination::set_route_name ( std::string  name)
inline

Set name of the route that was used to reach this destination.

Parameters
nameroute name

Member Data Documentation

◆ dest_

std::optional<mysql_harness::Destination> Destination::dest_
private

◆ guidelines_route_info_

Guidelines_route_info Destination::guidelines_route_info_
private

◆ server_info_

routing_guidelines::Server_info Destination::server_info_ {}
private

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