/** * Captures the connection pool metrics. */ private void captureConnectionPoolMetrics() { if (awsRequestMetrics.isEnabled() && httpClient.getHttpClientConnectionManager() instanceof ConnPoolControl<?>) { final PoolStats stats = ((ConnPoolControl<?>) httpClient .getHttpClientConnectionManager()).getTotalStats(); awsRequestMetrics .withCounter(HttpClientPoolAvailableCount, stats.getAvailable()) .withCounter(HttpClientPoolLeasedCount, stats.getLeased()) .withCounter(HttpClientPoolPendingCount, stats.getPending()); } }
@Override public int getPending() { return pool.getTotalStats().getPending(); } }
@Override public int getLeased() { return pool.getTotalStats().getLeased(); } @Override
@Override public int getAvailable() { return pool.getTotalStats().getAvailable(); } @Override
@Override public int getMax() { return pool.getTotalStats().getMax(); } @Override
@Override public void process(final PoolEntry<T, C> entry) { if (entry.getUpdated() <= deadline) { entry.close(); } }
@Override public E getPoolEntry( final long timeout, final TimeUnit tunit) throws InterruptedException, TimeoutException, IOException { final E entry = getPoolEntryBlocking(route, state, timeout, tunit, this); onLease(entry); return entry; }
@Override protected E createEntry(final C conn) { return AbstractConnPool.this.createEntry(route, conn); }
/** * Captures the connection pool metrics. */ private void captureConnectionPoolMetrics() { if (awsRequestMetrics.isEnabled() && httpClient.getHttpClientConnectionManager() instanceof ConnPoolControl<?>) { final PoolStats stats = ((ConnPoolControl<?>) httpClient .getHttpClientConnectionManager()).getTotalStats(); awsRequestMetrics .withCounter(HttpClientPoolAvailableCount, stats.getAvailable()) .withCounter(HttpClientPoolLeasedCount, stats.getLeased()) .withCounter(HttpClientPoolPendingCount, stats.getPending()); } }
@Override public void process(final PoolEntry<T, C> entry) { if (entry.getUpdated() <= deadline) { entry.close(); } }
@Override public E getPoolEntry( final long timeout, final TimeUnit tunit) throws InterruptedException, TimeoutException, IOException { final E entry = getPoolEntryBlocking(route, state, timeout, tunit, this); onLease(entry); return entry; }
public void process(final PoolEntry<T, C> entry) { if (entry.getUpdated() <= deadline) { entry.close(); } }
@Override public void process(final PoolEntry<T, C> entry) { if (entry.getUpdated() <= deadline) { entry.close(); } }
@Override public void process(final PoolEntry<T, C> entry) { if (entry.getUpdated() <= deadline) { entry.close(); } }