MySQL  8.0.28
Source Code Documentation
mysqlrouter::TargetCluster Class Reference

#include <cluster_metadata.h>

Public Types

enum class  TargetType { ByUUID , ByName , ByPrimaryRole }
 
enum class  InvalidatedClusterRoutingPolicy { DropAll , AcceptRO }
 

Public Member Functions

 TargetCluster (const TargetType type=TargetType::ByPrimaryRole, const std::string &value="")
 
std::string to_string () const
 
const char * c_str () const
 
TargetType target_type () const
 
bool is_primary () const
 
bool is_invalidated () const
 
bool is_usable () const
 
InvalidatedClusterRoutingPolicy invalidated_cluster_routing_policy () const
 
void target_type (const TargetType value)
 
void target_value (const std::string &value)
 
void is_primary (const bool value)
 
void is_invalidated (const bool value)
 
void invalidated_cluster_routing_policy (const InvalidatedClusterRoutingPolicy value)
 
std::string options_string () const
 
void options_string (const std::string &options_string)
 

Private Attributes

TargetType target_type_
 
std::string target_value_
 
InvalidatedClusterRoutingPolicy invalidated_cluster_routing_policy_
 
bool is_primary_ {false}
 
bool is_invalidated_ {false}
 
std::string options_string_ {"{}"}
 

Member Enumeration Documentation

◆ InvalidatedClusterRoutingPolicy

Enumerator
DropAll 
AcceptRO 

◆ TargetType

Enumerator
ByUUID 
ByName 
ByPrimaryRole 

Constructor & Destructor Documentation

◆ TargetCluster()

mysqlrouter::TargetCluster::TargetCluster ( const TargetType  type = TargetType::ByPrimaryRole,
const std::string &  value = "" 
)
inline

Member Function Documentation

◆ c_str()

const char* mysqlrouter::TargetCluster::c_str ( ) const
inline

◆ invalidated_cluster_routing_policy() [1/2]

InvalidatedClusterRoutingPolicy mysqlrouter::TargetCluster::invalidated_cluster_routing_policy ( ) const
inline

◆ invalidated_cluster_routing_policy() [2/2]

void mysqlrouter::TargetCluster::invalidated_cluster_routing_policy ( const InvalidatedClusterRoutingPolicy  value)
inline

◆ is_invalidated() [1/2]

bool mysqlrouter::TargetCluster::is_invalidated ( ) const
inline

◆ is_invalidated() [2/2]

void mysqlrouter::TargetCluster::is_invalidated ( const bool  value)
inline

◆ is_primary() [1/2]

bool mysqlrouter::TargetCluster::is_primary ( ) const
inline

◆ is_primary() [2/2]

void mysqlrouter::TargetCluster::is_primary ( const bool  value)
inline

◆ is_usable()

bool mysqlrouter::TargetCluster::is_usable ( ) const
inline

◆ options_string() [1/2]

std::string mysqlrouter::TargetCluster::options_string ( ) const
inline

◆ options_string() [2/2]

void mysqlrouter::TargetCluster::options_string ( const std::string &  options_string)
inline

◆ target_type() [1/2]

TargetType mysqlrouter::TargetCluster::target_type ( ) const
inline

◆ target_type() [2/2]

void mysqlrouter::TargetCluster::target_type ( const TargetType  value)
inline

◆ target_value()

void mysqlrouter::TargetCluster::target_value ( const std::string &  value)
inline

◆ to_string()

std::string mysqlrouter::TargetCluster::to_string ( ) const
inline

Member Data Documentation

◆ invalidated_cluster_routing_policy_

InvalidatedClusterRoutingPolicy mysqlrouter::TargetCluster::invalidated_cluster_routing_policy_
private

◆ is_invalidated_

bool mysqlrouter::TargetCluster::is_invalidated_ {false}
private

◆ is_primary_

bool mysqlrouter::TargetCluster::is_primary_ {false}
private

◆ options_string_

std::string mysqlrouter::TargetCluster::options_string_ {"{}"}
private

◆ target_type_

TargetType mysqlrouter::TargetCluster::target_type_
private

◆ target_value_

std::string mysqlrouter::TargetCluster::target_value_
private

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