MySQL 8.0.39
Source Code Documentation
StateTrackingDestination Class Reference
Inheritance diagram for StateTrackingDestination:
[legend]

Public Member Functions

 StateTrackingDestination (std::string id, std::string addr, uint16_t port, DestNextAvailable *balancer, size_t ndx)
 
void connect_status (std::error_code ec) override
 status of the last failed connect(). More...
 
bool good () const override
 check if the destination is "good". 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...
 

Private Attributes

DestNextAvailablebalancer_
 
size_t ndx_
 

Constructor & Destructor Documentation

◆ StateTrackingDestination()

StateTrackingDestination::StateTrackingDestination ( std::string  id,
std::string  addr,
uint16_t  port,
DestNextAvailable balancer,
size_t  ndx 
)
inline

Member Function Documentation

◆ connect_status()

void StateTrackingDestination::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.

◆ good()

bool StateTrackingDestination::good ( ) const
inlineoverridevirtual

check if the destination is "good".

If the destination is not "good", it will be skipped by MySQLRouting.

Return values
falseif destination is known to be bad
trueotherwise

Reimplemented from Destination.

Member Data Documentation

◆ balancer_

DestNextAvailable* StateTrackingDestination::balancer_
private

◆ ndx_

size_t StateTrackingDestination::ndx_
private

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