Source:
public BlockingChannelInfo(ConnectionPoolConfig config, String host, Port port, MetricRegistry registry, SSLSocketFactory sslSocketFactory, SSLConfig sslConfig) { this.config = config; this.port = port; this.registry = registry; if (port.getPortType() == PortType.SSL) { maxConnectionsPerHostPerPort = config.connectionPoolMaxConnectionsPerPortSSL; } else { maxConnectionsPerHostPerPort = config.connectionPoolMaxConnectionsPerPortPlainText; } this.blockingChannelAvailableConnections = new ArrayBlockingQueue<BlockingChannel>(maxConnectionsPerHostPerPort); this.blockingChannelActiveConnections = new ArrayBlockingQueue<BlockingChannel>(maxConnectionsPerHostPerPort); this.numberOfConnections = new AtomicInteger(0); this.maxConnectFailuresToCleanUp = config.connectionPoolMaxConnectFailuresToCleanUpAvailablePool; currentConnectFailuresToCleanUp = new AtomicInteger(0); this.rwlock = new ReentrantReadWriteLock(); this.lock = new Object(); this.host = host; this.sslSocketFactory = sslSocketFactory; this.sslConfig = sslConfig; availableConnections = new Gauge<Integer>() { @Override public Integer getValue() { return blockingChannelAvailableConnections.size(); } }; registry .register(MetricRegistry.name(BlockingChannelInfo.class, host + "-" + port.getPort() + "-availableConnections"), availableConnections); activeConnections = new Gauge<Integer>() { @Override public Integer getValue() { return blockingChannelActiveConnections.size(); } }; registry .register(MetricRegistry.name(BlockingChannelInfo.class, host + "-" + port.getPort() + "-activeConnections"), activeConnections); totalNumberOfConnections = new Gauge<Integer>() { @Override public Integer getValue() { return numberOfConnections.intValue(); } }; registry.register( MetricRegistry.name(BlockingChannelInfo.class, host + "-" + port.getPort() + "-totalNumberOfConnections"), totalNumberOfConnections); logger.info("Starting blocking channel info for host and port {}", host, port.getPort()); }

Target:
public BlockingChannelInfo(ConnectionPoolConfig config, String host, Port port, MetricRegistry registry, SSLSocketFactory sslSocketFactory, SSLConfig sslConfig) { this.config = config; this.port = port; this.registry = registry; if (port.getPortType() == PortType.SSL) { maxConnectionsPerHostPerPort = config.connectionPoolMaxConnectionsPerPortSSL; } else { maxConnectionsPerHostPerPort = config.connectionPoolMaxConnectionsPerPortPlainText; } this.blockingChannelAvailableConnections = new ArrayBlockingQueue<BlockingChannel>(maxConnectionsPerHostPerPort); this.blockingChannelActiveConnections = new ArrayBlockingQueue<BlockingChannel>(maxConnectionsPerHostPerPort); this.numberOfConnections = new AtomicInteger(0); this.rwlock = new ReentrantReadWriteLock(); this.lock = new Object(); this.host = host; this.sslSocketFactory = sslSocketFactory; this.sslConfig = sslConfig; availableConnections = new Gauge<Integer>() { @Override public Integer getValue() { return blockingChannelAvailableConnections.size(); } }; registry.register( MetricRegistry.name(BlockingChannelInfo.class, host + "-" + port.getPort() + "-availableConnections"), availableConnections); activeConnections = new Gauge<Integer>() { @Override public Integer getValue() { return blockingChannelActiveConnections.size(); } }; registry.register( MetricRegistry.name(BlockingChannelInfo.class, host + "-" + port.getPort() + "-activeConnections"), activeConnections); totalNumberOfConnections = new Gauge<Integer>() { @Override public Integer getValue() { return numberOfConnections.intValue(); } }; registry.register( MetricRegistry.name(BlockingChannelInfo.class, host + "-" + port.getPort() + "-totalNumberOfConnections"), totalNumberOfConnections); logger.info("Starting blocking channel info for host and port {}", host, port.getPort()); }