MySQL 9.1.0
Source Code Documentation
MetadataCacheDestination Class Reference
Inheritance diagram for MetadataCacheDestination:
[legend]

Public Member Functions

 MetadataCacheDestination (std::string id, std::string addr, uint16_t port, DestMetadataCacheGroup *balancer, std::string server_uuid, mysqlrouter::ServerMode server_mode)
 
void connect_status (std::error_code ec) override
 status of the last failed connect(). More...
 
std::string server_uuid () const
 
std::error_code last_error_code () const
 
mysqlrouter::ServerMode server_mode () const override
 server-mode of the destination. More...
 
- Public Member Functions inherited from Destination
 Destination (std::string id, std::string hostname, uint16_t port)
 
virtual ~Destination ()=default
 
std::string id () const
 unique, opaque identifier of a destination. More...
 
std::string hostname () const
 hostname to connect to. More...
 
uint16_t port () const noexcept
 TCP port to connect to. More...
 
virtual bool good () const
 check if the destination is "good". More...
 

Private Attributes

DestMetadataCacheGroupbalancer_
 
std::string server_uuid_
 
mysqlrouter::ServerMode server_mode_
 
std::error_code last_ec_
 

Constructor & Destructor Documentation

◆ MetadataCacheDestination()

MetadataCacheDestination::MetadataCacheDestination ( std::string  id,
std::string  addr,
uint16_t  port,
DestMetadataCacheGroup balancer,
std::string  server_uuid,
mysqlrouter::ServerMode  server_mode 
)
inline

Member Function Documentation

◆ connect_status()

void MetadataCacheDestination::connect_status ( std::error_code  )
inlineoverridevirtual

status of the last failed connect().

called by MySQLRouting after a connect() to all addresses of the destination failed.

Reimplemented from Destination.

◆ last_error_code()

std::error_code MetadataCacheDestination::last_error_code ( ) const
inline

◆ server_mode()

mysqlrouter::ServerMode MetadataCacheDestination::server_mode ( ) const
inlineoverridevirtual

server-mode of the destination.

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

Reimplemented from Destination.

◆ server_uuid()

std::string MetadataCacheDestination::server_uuid ( ) const
inline

Member Data Documentation

◆ balancer_

DestMetadataCacheGroup* MetadataCacheDestination::balancer_
private

◆ last_ec_

std::error_code MetadataCacheDestination::last_ec_
private

◆ server_mode_

mysqlrouter::ServerMode MetadataCacheDestination::server_mode_
private

◆ server_uuid_

std::string MetadataCacheDestination::server_uuid_
private

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