MySQL 9.3.0
Source Code Documentation
Round_robin_strategy Class Reference

Round-robin strategy. More...

#include <dest_static.h>

Inheritance diagram for Round_robin_strategy:
[legend]

Public Member Functions

std::optional< std::uint32_t > get_destination_index (const bool last_connection_successful, const std::uint32_t dest_pool_size) override
 
- Public Member Functions inherited from StrategyHandler
virtual ~StrategyHandler ()=default
 

Private Attributes

bool started_ {false}
 
std::optional< std::uint32_t > failed_instance_index_
 

Additional Inherited Members

- Protected Attributes inherited from StrategyHandler
std::uint32_t index_pos_ {0}
 

Detailed Description

Round-robin strategy.

Move to next destination after each connection attempt. If end of the destination candidates list is reached then loop around. If destination candidates list is exhausted (after unsuccessful connection we tried every destinaion from the list and eventually went back to the position that failed at first) then fail the connection.

Member Function Documentation

◆ get_destination_index()

std::optional< std::uint32_t > Round_robin_strategy::get_destination_index ( const bool  last_connection_successful,
const std::uint32_t  dest_pool_size 
)
overridevirtual

Implements StrategyHandler.

Member Data Documentation

◆ failed_instance_index_

std::optional<std::uint32_t> Round_robin_strategy::failed_instance_index_
private

◆ started_

bool Round_robin_strategy::started_ {false}
private

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