src/main/java/com/alipay/remoting/rpc/RpcClient.java
public Connection getConnection(String addr, int connectTimeout) throws RemotingException,
                                                                    InterruptedException {
        Url url = this.addressParser.parse(addr);
        return this.getConnection(url, connectTimeout);
    }
public Connection getConnection(String addr, int connectTimeout) throws RemotingException,
                                                                    InterruptedException {
        Url url = this.addressParser.parse(addr);
        return this.getConnection(url, connectTimeout);
    }
public Connection getConnection ( String addr , int connectTimeout ) throws RemotingException , InterruptedException { Url url = this . addressParser . parse ( addr ) ; return this . getConnection ( url , connectTimeout ) ; }
Get a connection using address, address format example - 127.0.0.1:12200?key1=value1&key2=value2 <br>
<p>
Notice:<br>
<ol>
<li>Get a connection, if none then create.</li>
<ul>
<li>You can use {@link RpcConfigs#CONNECT_TIMEOUT_KEY} to specify connection timeout, time unit is milliseconds, e.g [127.0.0.1:12200?_CONNECTTIMEOUT=3000]
<li>You can use {@link RpcConfigs#CONNECTION_NUM_KEY} to specify connection number for each ip and port, e.g [127.0.0.1:12200?_CONNECTIONNUM=30]
<li>You can use {@link RpcConfigs#CONNECTION_WARMUP_KEY} to specify whether need warmup all connections for the first time you call this method, e.g [127.0.0.1:12200?_CONNECTIONWARMUP=false]
</ul>
<li>Bolt will control this connection in {@link ConnectionPool}
<li>You should use {@link #closeConnection(String addr)} to close it.
</ol>
@param addr
@param connectTimeout this is prior to url args {@link RpcConfigs#CONNECT_TIMEOUT_KEY}
@return
@throws RemotingException
Get a connection using address address format example - 127 . 0 . 0 . 1 : 12200?key1 = value1&key2 = value2 <br > <p > Notice : <br > <ol > <li > Get a connection if none then create . < / li > <ul > <li > You can use {