void Session::on_up(SharedRefPtr<Host> host) { host->set_up(); if (load_balancing_policy_->distance(host) == CASS_HOST_DISTANCE_IGNORE) { return; } load_balancing_policy_->on_up(host); for (IOWorkerVec::iterator it = io_workers_.begin(), end = io_workers_.end(); it != end; ++it) { (*it)->add_pool_async(host->address(), false); } }
void Session::on_add(SharedRefPtr<Host> host, bool is_initial_connection) { host->set_up(); if (load_balancing_policy_->distance(host) == CASS_HOST_DISTANCE_IGNORE) { return; } if (is_initial_connection) { pending_pool_count_ += io_workers_.size(); } else { load_balancing_policy_->on_add(host); } for (IOWorkerVec::iterator it = io_workers_.begin(), end = io_workers_.end(); it != end; ++it) { (*it)->add_pool_async(host->address(), is_initial_connection); } }