26#ifndef METADATA_CACHE_ROUTER_OPTIONS_INCLUDED
27#define METADATA_CACHE_ROUTER_OPTIONS_INCLUDED
Represents the Router options in v2_routers view in the metadata schema.
Definition: router_options.h:58
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.
Definition: router_options.cc:240
unsigned int router_id_
Definition: router_options.h:110
std::string options_str_
Definition: router_options.h:109
QuorumConnectionLostAllowTraffic get_unreachable_quorum_allowed_traffic() const
Get the unreachable_quorum_allowed_traffic value assigned for a given Router in the metadata.
Definition: router_options.cc:341
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.
Definition: router_options.cc:192
mysqlrouter::ClusterType cluster_type_
Definition: router_options.h:111
std::string get_string() const
Get the raw JSON string read from the metadata during the last read_from_metadata() call.
Definition: router_options.h:77
std::optional< mysqlrouter::TargetCluster > get_target_cluster() const
Get the target_cluster assigned for a given Router in the metadata.
Definition: router_options.cc:132
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.
Definition: router_options.cc:226
ReadOnlyTargets get_read_only_targets() const
Get the setting for RO targets assigned to a given Router in the metadata.
Definition: router_options.cc:286
Definition: mysql_session.h:154
ClusterType
Definition: cluster_metadata.h:140
mode
Definition: file_handle.h:61
ReadOnlyTargets
Definition: router_options.h:39
METADATA_CACHE_EXPORT std::string to_string(const ReadOnlyTargets mode)
Definition: router_options.cc:329
static const auto kDefautlInvalidatedClusterRoutingPolicy
Definition: router_options.h:36
static const QuorumConnectionLostAllowTraffic kDefaultQuorumConnectionLostAllowTraffic
Definition: router_options.h:47
static const ReadOnlyTargets kDefaultReadOnlyTargets
Definition: router_options.h:40
QuorumConnectionLostAllowTraffic
Definition: router_options.h:45