![]() |
MySQL 9.2.0
Source Code Documentation
|
Class representing routing guidelines route section entry. More...
#include <routing_guidelines.h>
Classes | |
struct | DestinationGroup |
Public Member Functions | |
Route (std::string name, std::unique_ptr< rpn::Expression > match, std::vector< DestinationGroup > destination_groups, const std::optional< bool > connection_sharing_allowed=std::nullopt, const bool enabled=true) | |
auto | operator<=> (const Route &) const =default |
Public Attributes | |
std::string | name |
Name of the route. More... | |
std::unique_ptr< rpn::Expression > | match |
Matching criterion for the given route. More... | |
std::vector< DestinationGroup > | destination_groups |
Destination groups used by the route. More... | |
std::optional< bool > | connection_sharing_allowed |
Connection sharing enabled flag. More... | |
bool | enabled {true} |
Route enabled flag. More... | |
Class representing routing guidelines route section entry.
Each route references destinations that are groupped by the destination class section in the routing guideline:
This example provides a destination class named "secondary_dests" which matches SECONDARY nodes. Given this route:
Route named "r1" uses "secondary_dests" destination class. Each node classified in the "secondary_dests" will be used according to the 'round-robin' routing strategy.
If one route entry uses multiple destination classes then nodes from each destination classes are used. For example:
Such route will use destinations classified as "secondary_dests" as well as "other_dests".
One route may define multiple backup sinks which are used when no destinations from previous groups can be reached. They are groupped by the 'priority' setting, where lower value means higher priority, '0' means highest priority.
For example:
Route "r1" defines two destination groups that could be used, one containing destinations classified by "d1" or "d2" destination classes, and the other one containing destinations classified by "d3" destination class. Destinations classified by "d3" will be used if and only if no destination from "d1" and "d2" are reachable.
routing_guidelines::Routing_guidelines_engine::Route::Route | ( | std::string | name, |
std::unique_ptr< rpn::Expression > | match, | ||
std::vector< DestinationGroup > | destination_groups, | ||
const std::optional< bool > | connection_sharing_allowed = std::nullopt , |
||
const bool | enabled = true |
||
) |
|
default |
std::optional<bool> routing_guidelines::Routing_guidelines_engine::Route::connection_sharing_allowed |
Connection sharing enabled flag.
std::vector<DestinationGroup> routing_guidelines::Routing_guidelines_engine::Route::destination_groups |
Destination groups used by the route.
bool routing_guidelines::Routing_guidelines_engine::Route::enabled {true} |
Route enabled flag.
std::unique_ptr<rpn::Expression> routing_guidelines::Routing_guidelines_engine::Route::match |
Matching criterion for the given route.
std::string routing_guidelines::Routing_guidelines_engine::Route::name |
Name of the route.