private Pool findOrCreatePool ( String host , int port ) { String poolName = Utils . toKey ( host , port ) ; Pool pool = PoolManager . find ( poolName ) ; if ( pool == null ) { poolFactory . reset ( ) ; poolFactory . addServer ( host , port ) ; pool = poolFactory . create ( poolName ) ; } return pool ; }
Looks for the existing pool with name poolFactory . If there is no such pool creates new one .