![]() |
MySQL 8.0.43
Source Code Documentation
|
Cluster (GR or AR)-aware decorator for MySQL Sessions. More...
Public Member Functions | |
| ClusterAwareDecorator (ClusterMetadata &metadata, const std::string &cluster_initial_username, const std::string &cluster_initial_password, const std::string &cluster_initial_hostname, unsigned long cluster_initial_port, const std::string &cluster_initial_socket, unsigned long connection_timeout, std::set< MySQLErrorc > failure_codes={MySQLErrorc::kSuperReadOnly, MySQLErrorc::kLostConnection}) | |
| template<class R > | |
| R | failover_on_failure (std::function< R()> wrapped_func) |
| Cluster (GR or AR) aware failover. More... | |
| virtual | ~ClusterAwareDecorator ()=default |
Protected Member Functions | |
| void | connect (MySQLSession &session, const std::string &host, const unsigned port) |
Protected Attributes | |
| ClusterMetadata & | metadata_ |
| const std::string & | cluster_initial_username_ |
| const std::string & | cluster_initial_password_ |
| const std::string & | cluster_initial_hostname_ |
| unsigned long | cluster_initial_port_ |
| const std::string & | cluster_initial_socket_ |
| unsigned long | connection_timeout_ |
| std::set< MySQLErrorc > | failure_codes_ |
Cluster (GR or AR)-aware decorator for MySQL Sessions.
|
inline |
|
virtualdefault |
|
protected |
| R ClusterAwareDecorator::failover_on_failure | ( | std::function< R()> | wrapped_func | ) |
Cluster (GR or AR) aware failover.
| wrapped_func | function will be called |
assumes:
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |