MySQL 8.4.2
Source Code Documentation
Destinations Class Reference

A forward iterable container of destinations. More...

#include <destination.h>

Public Types

using value_type = std::unique_ptr< Destination >
 
using container_type = std::list< value_type >
 
using iterator = typename container_type::iterator
 
using const_iterator = typename container_type::const_iterator
 
using size_type = typename container_type::size_type
 

Public Member Functions

iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
template<class... Args>
auto emplace_back (Args &&... args)
 emplace a Destination at the back of the container. More...
 
void push_back (value_type &&v)
 
bool empty () const
 check if destination container is empty. More...
 
void clear ()
 clear all values. More...
 
size_type size () const
 number of destinations. More...
 
bool primary_already_used () const
 Check if we already used the primaries and don't want to fallback. More...
 
void primary_already_used (const bool p)
 Mark that the primary destinations are already used. More...
 
bool is_primary_destination () const
 Check if destinations are primary destinations. More...
 
void set_is_primary_destination (const bool p)
 Mark that the destinations are primary destinations. More...
 

Private Attributes

container_type destinations_
 
bool primary_already_used_ {false}
 
bool is_primary_destination_ {false}
 

Detailed Description

A forward iterable container of destinations.

a PRIMARY destination set won't be failover from.

See also
RouteDestination::refresh_destinations()

Member Typedef Documentation

◆ const_iterator

using Destinations::const_iterator = typename container_type::const_iterator

◆ container_type

◆ iterator

using Destinations::iterator = typename container_type::iterator

◆ size_type

using Destinations::size_type = typename container_type::size_type

◆ value_type

using Destinations::value_type = std::unique_ptr<Destination>

Member Function Documentation

◆ begin() [1/2]

iterator Destinations::begin ( )
inline

◆ begin() [2/2]

const_iterator Destinations::begin ( ) const
inline

◆ clear()

void Destinations::clear ( )
inline

clear all values.

◆ emplace_back()

template<class... Args>
auto Destinations::emplace_back ( Args &&...  args)
inline

emplace a Destination at the back of the container.

◆ empty()

bool Destinations::empty ( ) const
inline

check if destination container is empty.

Return values
trueif container is empty.

◆ end() [1/2]

iterator Destinations::end ( )
inline

◆ end() [2/2]

const_iterator Destinations::end ( ) const
inline

◆ is_primary_destination()

bool Destinations::is_primary_destination ( ) const
inline

Check if destinations are primary destinations.

Return values
truedestinations are primary destinations.
falsedestinations are secondary destinations.

◆ primary_already_used() [1/2]

bool Destinations::primary_already_used ( ) const
inline

Check if we already used the primaries and don't want to fallback.

Return values
trueprimaries already used
falseprimaries are not yet used

◆ primary_already_used() [2/2]

void Destinations::primary_already_used ( const bool  p)
inline

Mark that the primary destinations are already used.

Parameters
ptrue if PRIMARY destinations are already used.

◆ push_back()

void Destinations::push_back ( value_type &&  v)
inline

◆ set_is_primary_destination()

void Destinations::set_is_primary_destination ( const bool  p)
inline

Mark that the destinations are primary destinations.

Parameters
ptrue if desitnations are PRIMARY destinations.

◆ size()

size_type Destinations::size ( ) const
inline

number of destinations.

Member Data Documentation

◆ destinations_

container_type Destinations::destinations_
private

◆ is_primary_destination_

bool Destinations::is_primary_destination_ {false}
private

◆ primary_already_used_

bool Destinations::primary_already_used_ {false}
private

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