*
* @param registry the SchemeRegistry
* @return a InstrumentedClientConnManger instance
*/
protected NHttpClientConnectionManager createConnectionManager(SchemeRegistry registry, String name) {
final Duration ttl = configuration.getTimeToLive();
ConnectingIOReactor ioReactor = createDefaultIOReactor(IOReactorConfig.custom()
.setSoTimeout((int) configuration.getTimeout().toMilliseconds())
.setConnectTimeout((int) configuration.getConnectionTimeout().toMilliseconds())
.setTcpNoDelay(true).build());
PoolingNHttpClientConnectionManager manager
= new InstrumentedNClientConnManager(
ioReactor, null, null, //TODO: add this parameters values
metricRegistry,
convertRegistry(this.registry),
ttl.getQuantity(),
ttl.getUnit(),
resolver,
name);
manager.setDefaultMaxPerRoute(configuration.getMaxConnectionsPerRoute());
manager.setMaxTotal(configuration.getMaxConnections());
return manager;