| 323 | } |
| 324 | |
| 325 | connect_pool* connect_manager::create_pool(const conn_config& cf, size_t idx) |
| 326 | { |
| 327 | string key; |
| 328 | get_key(cf.addr, key); |
| 329 | |
| 330 | connect_pool* pool = create_pool(cf.addr, cf.max, idx); |
| 331 | pool->set_key(key); |
| 332 | pool->set_retry_inter(retry_inter_); |
| 333 | pool->set_timeout(cf.conn_timeout, cf.rw_timeout, cf.sockopt_timeo); |
| 334 | if (cf.min > 0) { |
| 335 | pool->set_conns_min(cf.min); |
| 336 | } |
| 337 | if (idle_ttl_ >= 0) { |
| 338 | pool->set_idle_ttl(idle_ttl_); |
| 339 | } |
| 340 | if (check_inter_ > 0) { |
| 341 | pool->set_check_inter(check_inter_); |
| 342 | } |
| 343 | |
| 344 | logger_debug(ACL_CPP_DEBUG_CONN_MANAGER, 1, |
| 345 | "Add one service, addr: %s, count: %d", |
| 346 | cf.addr.c_str(), (int) cf.max); |
| 347 | return pool; |
| 348 | } |
| 349 | |
| 350 | connect_pool* connect_manager::get(const char* addr, |
| 351 | bool exclusive /* = true */, bool restore /* = false */) |
nothing calls this directly
no test coverage detected