MySQL 8.0.39
Source Code Documentation
GRMetadataBackend Class Referenceabstract
Inheritance diagram for GRMetadataBackend:
[legend]

Public Member Functions

 GRMetadataBackend (GRClusterMetadata *metadata, ConnectCallback &connect_clb)
 
virtual ~GRMetadataBackend ()
 
virtual metadata_cache::ClusterTopology fetch_instances_from_metadata_server (const mysqlrouter::TargetCluster &target_cluster, const std::string &clusterset_id="")=0
 Queries the metadata server for the list of instances that belong to the desired cluster. More...
 
virtual mysqlrouter::ClusterType get_cluster_type ()=0
 
virtual stdx::expected< metadata_cache::ClusterTopology, std::error_code > fetch_cluster_topology (MySQLSession::Transaction &transaction, const mysqlrouter::MetadataSchemaVersion &schema_version, mysqlrouter::TargetCluster &target_cluster, const unsigned router_id, const metadata_cache::metadata_server_t &metadata_server, const metadata_cache::metadata_servers_list_t &metadata_servers, bool needs_writable_node, const std::string &clusterset_id, bool whole_topology)
 
virtual void fetch_periodic_stats_update_frequency (const mysqlrouter::MetadataSchemaVersion &, const unsigned)
 
virtual std::vector< metadata_cache::metadata_servers_list_tget_metadata_servers (const metadata_cache::metadata_servers_list_t &metadata_servers)
 
virtual std::optional< std::chrono::secondsget_periodic_stats_update_frequency () noexcept
 
virtual void reset ()
 

Protected Attributes

GRClusterMetadatametadata_
 
ConnectCallback connect_clb_
 
std::optional< std::chrono::secondsperiodic_stats_update_frequency_ {}
 

Constructor & Destructor Documentation

◆ GRMetadataBackend()

GRMetadataBackend::GRMetadataBackend ( GRClusterMetadata metadata,
ConnectCallback connect_clb 
)
inline

◆ ~GRMetadataBackend()

GRMetadataBackend::~GRMetadataBackend ( )
virtualdefault

Member Function Documentation

◆ fetch_cluster_topology()

stdx::expected< metadata_cache::ClusterTopology, std::error_code > GRMetadataBackend::fetch_cluster_topology ( MySQLSession::Transaction &  transaction,
const mysqlrouter::MetadataSchemaVersion schema_version,
mysqlrouter::TargetCluster target_cluster,
const unsigned  router_id,
const metadata_cache::metadata_server_t metadata_server,
const metadata_cache::metadata_servers_list_t metadata_servers,
bool  needs_writable_node,
const std::string &  clusterset_id = "",
bool  whole_topology = false 
)
virtual

Reimplemented in GRClusterSetMetadataBackend.

◆ fetch_instances_from_metadata_server()

virtual metadata_cache::ClusterTopology GRMetadataBackend::fetch_instances_from_metadata_server ( const mysqlrouter::TargetCluster target_cluster,
const std::string &  clusterset_id = "" 
)
pure virtual

Queries the metadata server for the list of instances that belong to the desired cluster.

Implemented in GRMetadataBackendV1, and GRMetadataBackendV2.

◆ fetch_periodic_stats_update_frequency()

virtual void GRMetadataBackend::fetch_periodic_stats_update_frequency ( const mysqlrouter::MetadataSchemaVersion ,
const unsigned   
)
inlinevirtual

Reimplemented in GRMetadataBackendV2.

◆ get_cluster_type()

virtual mysqlrouter::ClusterType GRMetadataBackend::get_cluster_type ( )
pure virtual

◆ get_metadata_servers()

virtual std::vector< metadata_cache::metadata_servers_list_t > GRMetadataBackend::get_metadata_servers ( const metadata_cache::metadata_servers_list_t metadata_servers)
inlinevirtual

Reimplemented in GRClusterSetMetadataBackend.

◆ get_periodic_stats_update_frequency()

virtual std::optional< std::chrono::seconds > GRMetadataBackend::get_periodic_stats_update_frequency ( )
inlinevirtualnoexcept

Reimplemented in GRClusterSetMetadataBackend.

◆ reset()

virtual void GRMetadataBackend::reset ( )
inlinevirtual

Reimplemented in GRClusterSetMetadataBackend.

Member Data Documentation

◆ connect_clb_

ConnectCallback GRMetadataBackend::connect_clb_
protected

◆ metadata_

GRClusterMetadata* GRMetadataBackend::metadata_
protected

◆ periodic_stats_update_frequency_

std::optional<std::chrono::seconds> GRMetadataBackend::periodic_stats_update_frequency_ {}
protected

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