fn add_new_server(
        &mut self,
        address: ServerAddress,
        options: ClientOptions,
        topology: &WeakTopology,
    ) {
        if self.servers.contains_key(&address) {
            return;
        }

        let (server, monitor) = Server::create(
            address.clone(),
            &options,
            topology.clone(),
            self.http_client.clone(),
        );
        self.servers.insert(address, server);

        #[cfg(test)]
        if options
            .test_options
            .map(|to| to.disable_monitoring_threads)
            .unwrap_or(false)
        {
            return;
        }

        monitor.start();
    }
/// Adds a new server to the cluster.
///
/// A reference to the containing Topology is needed in order to start the monitoring task.
Adds a new server to the cluster.
A reference to the containing Topology is needed in order to start the monitoring task.
Adds a new server to the cluster . A reference to the containing Topology is needed in order to start the monitoring task .
fn add_new_server(
        &mut self,
        address: ServerAddress,
        options: ClientOptions,
        topology: &WeakTopology,
    ) {
        if self.servers.contains_key(&address) {
            return;
        }
        let (server, monitor) = Server::create(
            address.clone(),
            &options,
            topology.clone(),
            self.http_client.clone(),
        );
        self.servers.insert(address, server);
        #[cfg(test)]
        if options
            .test_options
            .map(|to| to.disable_monitoring_threads)
            .unwrap_or(false)
        {
            return;
        }
        monitor.start();
    }
fn add_new_server ( & mut self , address : ServerAddress , options : ClientOptions , topology : & WeakTopology , ) { if self . servers . contains_key ( & address ) { return ; } let ( server , monitor ) = Server :: create ( address . clone ( ) , & options , topology . clone ( ) , self . http_client . clone ( ) , ) ; self . servers . insert ( address , server ) ; # [ cfg ( test ) ] if options . test_options . map ( | to | to . disable_monitoring_threads ) . unwrap_or ( false ) { return ; } monitor . start ( ) ; }
Adds a new server to the cluster.
Adds a new server to the cluster .
&mut self
address
ServerAddress
options
ClientOptions
topology
&WeakTopology
&mut self
address
ServerAddress
options
ClientOptions
topology
&WeakTopology