| 73 | } |
| 74 | |
| 75 | int PhxSQLClientDisasterStrategy::GetEndPoint(const std::vector<MySQLEndPoint_t> & vecMySQLEndPoints, |
| 76 | const MySQLEndPoint_t & tPreviousEndPoint, MySQLEndPoint_t & tEndPoint) { |
| 77 | int iRandomIdx = phxsql::RandomPicker(vecMySQLEndPoints.size()); |
| 78 | tEndPoint.m_sMySQLIP = vecMySQLEndPoints[iRandomIdx].m_sMySQLIP; |
| 79 | tEndPoint.m_iPort = vecMySQLEndPoints[iRandomIdx].m_iPort; |
| 80 | return phxsql::OK; |
| 81 | } |
| 82 | |
| 83 | //////////////////////////////////////// |
| 84 | void PhxSQLClientBase::InitProperty(MySQLProp_t * poProperty) { |