MySQL 9.1.0
Source Code Documentation
|
Represents the Router options in v2_routers view in the metadata schema. More...
#include <router_options.h>
Public Member Functions | |
bool | read_from_metadata (mysqlrouter::MySQLSession &session, const unsigned router_id, const mysqlrouter::MetadataSchemaVersion schema_version, const mysqlrouter::ClusterType cluster_type) |
Pupulate the object by reading the options from the metadata. More... | |
std::string | get_string () const |
Get the raw JSON string read from the metadata during the last read_from_metadata() call. More... | |
ReadOnlyTargets | get_read_only_targets () const |
Get the setting for RO targets assigned to a given Router in the metadata. More... | |
std::optional< std::chrono::seconds > | get_stats_updates_frequency () const |
Get the stats updates ferquency value (in seconds) assigned for a given Router in the metadata. More... | |
bool | get_use_replica_primary_as_rw () const |
Get the get_use_replica_primary_as_rw boolean value assigned for a given Router in the metadata. More... | |
QuorumConnectionLostAllowTraffic | get_unreachable_quorum_allowed_traffic () const |
Get the unreachable_quorum_allowed_traffic value assigned for a given Router in the metadata. More... | |
std::optional< mysqlrouter::TargetCluster > | get_target_cluster () const |
Get the target_cluster assigned for a given Router in the metadata. More... | |
Private Attributes | |
std::string | options_str_ |
unsigned int | router_id_ {} |
mysqlrouter::ClusterType | cluster_type_ {} |
Represents the Router options in v2_routers view in the metadata schema.
ReadOnlyTargets RouterOptions::get_read_only_targets | ( | ) | const |
Get the setting for RO targets assigned to a given Router in the metadata.
std::optional< std::chrono::seconds > RouterOptions::get_stats_updates_frequency | ( | ) | const |
Get the stats updates ferquency value (in seconds) assigned for a given Router in the metadata.
|
inline |
Get the raw JSON string read from the metadata during the last read_from_metadata() call.
std::optional< mysqlrouter::TargetCluster > RouterOptions::get_target_cluster | ( | ) | const |
Get the target_cluster assigned for a given Router in the metadata.
QuorumConnectionLostAllowTraffic RouterOptions::get_unreachable_quorum_allowed_traffic | ( | ) | const |
Get the unreachable_quorum_allowed_traffic value assigned for a given Router in the metadata.
bool RouterOptions::get_use_replica_primary_as_rw | ( | ) | const |
Get the get_use_replica_primary_as_rw boolean value assigned for a given Router in the metadata.
bool RouterOptions::read_from_metadata | ( | mysqlrouter::MySQLSession & | session, |
const unsigned | router_id, | ||
const mysqlrouter::MetadataSchemaVersion | schema_version, | ||
const mysqlrouter::ClusterType | cluster_type | ||
) |
Pupulate the object by reading the options from the metadata.
session | mysql server session to read metadata with |
router_id | id of the Router in the metadata\ |
schema_version | current metadata schema version |
cluster_type | type of the cluster the Router is configured to use |
|
private |
|
private |
|
private |