MySQL 8.0.40
Source Code Documentation
SharedQuarantineHandler Class Reference

#include <shared_quarantine_handler.h>

Public Types

using update_callback_type = std::function< bool(mysql_harness::TCPAddress, bool)>
 
using is_quarantined_callback_type = std::function< bool(mysql_harness::TCPAddress)>
 
using stop_callback_type = std::function< void()>
 
using refresh_callback_type = std::function< void(const std::string &, const bool, const AllowedNodes &)>
 

Public Member Functions

void on_update (update_callback_type clb)
 Register a callback that can to be used to add a destination candidate to the quarantine. More...
 
bool update (const mysql_harness::TCPAddress &addr, bool success)
 
void on_is_quarantined (is_quarantined_callback_type clb)
 Register a callback that can be used to check if the given destination candidate is currently quarantined. More...
 
bool is_quarantined (const mysql_harness::TCPAddress &addr) const
 
void on_stop (stop_callback_type clb)
 Register a callback that can be used to stop the unreachable destination candidates quarantine. More...
 
void stop ()
 
void on_refresh (refresh_callback_type clb)
 Register a callback used for refreshing the quarantined destinations when there are possible changes in the destination candidates set. More...
 
void refresh (const std::string &instance_name, bool some_bool, const AllowedNodes &allowed_nodes)
 
void reset ()
 Unregister all of the destination candidates quarantine callbacks. More...
 

Private Attributes

update_callback_type on_update_
 
is_quarantined_callback_type on_is_quarantined_
 
stop_callback_type on_stop_
 
refresh_callback_type on_refresh_
 

Member Typedef Documentation

◆ is_quarantined_callback_type

◆ refresh_callback_type

using SharedQuarantineHandler::refresh_callback_type = std::function<void( const std::string &, const bool, const AllowedNodes &)>

◆ stop_callback_type

using SharedQuarantineHandler::stop_callback_type = std::function<void()>

◆ update_callback_type

Member Function Documentation

◆ is_quarantined()

bool SharedQuarantineHandler::is_quarantined ( const mysql_harness::TCPAddress addr) const
inline

◆ on_is_quarantined()

void SharedQuarantineHandler::on_is_quarantined ( is_quarantined_callback_type  clb)
inline

Register a callback that can be used to check if the given destination candidate is currently quarantined.

Parameters
[in]clbCallback called to check if the destination is quarantined.

◆ on_refresh()

void SharedQuarantineHandler::on_refresh ( refresh_callback_type  clb)
inline

Register a callback used for refreshing the quarantined destinations when there are possible changes in the destination candidates set.

Parameters
[in]clbCallback called on metadata refresh.

◆ on_stop()

void SharedQuarantineHandler::on_stop ( stop_callback_type  clb)
inline

Register a callback that can be used to stop the unreachable destination candidates quarantine.

Parameters
[in]clbCallback called to remove all destinations from quarantine.

◆ on_update()

void SharedQuarantineHandler::on_update ( update_callback_type  clb)
inline

Register a callback that can to be used to add a destination candidate to the quarantine.

Parameters
[in]clbCallback called to quarantine a destination.

◆ refresh()

void SharedQuarantineHandler::refresh ( const std::string &  instance_name,
bool  some_bool,
const AllowedNodes allowed_nodes 
)
inline

◆ reset()

void SharedQuarantineHandler::reset ( )
inline

Unregister all of the destination candidates quarantine callbacks.

◆ stop()

void SharedQuarantineHandler::stop ( )
inline

◆ update()

bool SharedQuarantineHandler::update ( const mysql_harness::TCPAddress addr,
bool  success 
)
inline

Member Data Documentation

◆ on_is_quarantined_

is_quarantined_callback_type SharedQuarantineHandler::on_is_quarantined_
private

◆ on_refresh_

refresh_callback_type SharedQuarantineHandler::on_refresh_
private

◆ on_stop_

stop_callback_type SharedQuarantineHandler::on_stop_
private

◆ on_update_

update_callback_type SharedQuarantineHandler::on_update_
private

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