MySQL 8.0.39
Source Code Documentation
metadata_cache::ManagedInstance Class Reference

Class ManagedInstance represents a server managed by the topology. More...

#include <metadata_cache_datatypes.h>

Public Types

using TCPAddress = mysql_harness::TCPAddress
 

Public Member Functions

 ManagedInstance (InstanceType p_type, const std::string &p_mysql_server_uuid, const ServerMode p_mode, const ServerRole p_role, const std::string &p_host, const uint16_t p_port, const uint16_t p_xport)
 
 ManagedInstance (InstanceType p_type)
 
 ManagedInstance (InstanceType p_type, const TCPAddress &addr)
 
 operator TCPAddress () const
 
bool operator== (const ManagedInstance &other) const
 

Public Attributes

InstanceType type
 Instance type. More...
 
std::string mysql_server_uuid
 The uuid of the MySQL server. More...
 
ServerMode mode {ServerMode::Unavailable}
 The mode of the server. More...
 
ServerRole role {ServerRole::Unavailable}
 The role of the server. More...
 
std::string host
 The host name on which the server is running. More...
 
uint16_t port {0}
 The port number in which the server is running. More...
 
uint16_t xport {0}
 The X protocol port number in which the server is running. More...
 
std::string attributes
 Node atributes as a json string from metadata. More...
 
bool hidden {kNodeTagHiddenDefault}
 Should the node be hidden from the application to use it. More...
 
bool disconnect_existing_sessions_when_hidden
 Should the Router disconnect existing client sessions to the node when it is hidden. More...
 

Detailed Description

Class ManagedInstance represents a server managed by the topology.

Member Typedef Documentation

◆ TCPAddress

Constructor & Destructor Documentation

◆ ManagedInstance() [1/3]

metadata_cache::ManagedInstance::ManagedInstance ( InstanceType  p_type,
const std::string &  p_mysql_server_uuid,
const ServerMode  p_mode,
const ServerRole  p_role,
const std::string &  p_host,
const uint16_t  p_port,
const uint16_t  p_xport 
)

◆ ManagedInstance() [2/3]

metadata_cache::ManagedInstance::ManagedInstance ( InstanceType  p_type)
explicit

◆ ManagedInstance() [3/3]

metadata_cache::ManagedInstance::ManagedInstance ( InstanceType  p_type,
const TCPAddress addr 
)
explicit

Member Function Documentation

◆ operator TCPAddress()

metadata_cache::ManagedInstance::operator TCPAddress ( ) const

◆ operator==()

bool metadata_cache::ManagedInstance::operator== ( const ManagedInstance other) const

Member Data Documentation

◆ attributes

std::string metadata_cache::ManagedInstance::attributes

Node atributes as a json string from metadata.

◆ disconnect_existing_sessions_when_hidden

bool metadata_cache::ManagedInstance::disconnect_existing_sessions_when_hidden
Initial value:
{
constexpr const bool kNodeTagDisconnectWhenHiddenDefault
Definition: metadata_cache_datatypes.h:95

Should the Router disconnect existing client sessions to the node when it is hidden.

◆ hidden

bool metadata_cache::ManagedInstance::hidden {kNodeTagHiddenDefault}

Should the node be hidden from the application to use it.

◆ host

std::string metadata_cache::ManagedInstance::host

The host name on which the server is running.

◆ mode

ServerMode metadata_cache::ManagedInstance::mode {ServerMode::Unavailable}

The mode of the server.

◆ mysql_server_uuid

std::string metadata_cache::ManagedInstance::mysql_server_uuid

The uuid of the MySQL server.

◆ port

uint16_t metadata_cache::ManagedInstance::port {0}

The port number in which the server is running.

◆ role

ServerRole metadata_cache::ManagedInstance::role {ServerRole::Unavailable}

The role of the server.

◆ type

InstanceType metadata_cache::ManagedInstance::type

Instance type.

◆ xport

uint16_t metadata_cache::ManagedInstance::xport {0}

The X protocol port number in which the server is running.


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