@Test public void testCantUseUnconfiguredPool() throws IOException { try { this.pool.getRestConnection(3).describeGlobal(); fail(); } catch (IllegalStateException e) { assertEquals("Org <3> has not been configured", e.getMessage()); } }
@Nonnull @Override public synchronized RestConnection getRestConnection(@Nonnull T orgId) { return new RestConnectionImpl(objectMapper.reader(), new PoolHttpApiClientProvider(orgId), metricRegistry); }
RestConnectionPoolImpl implements RestConnectionPool<T> { @Nonnull @Override public synchronized RestConnection getRestConnection(@Nonnull T orgId) { return new RestConnectionImpl(objectMapper.reader(), new PoolHttpApiClientProvider(orgId), metricRegistry); } }
RestConnectionPoolImpl implements RestConnectionPool<T> { @Nonnull @Override public synchronized RestConnection getRestConnection(@Nonnull T orgId) { return new RestConnectionImpl(objectMapper.reader(), new PoolHttpApiClientProvider(orgId), metricRegistry); } RestConnectionPoolImpl(MetricRegistry metricRegistry);  RestConnectionPoolImpl(MetricRegistry metricRegistry, int idleConnTimeout);  RestConnectionPoolImpl(MetricRegistry metricRegistry, int idleConnTimeout,
            @Nullable HttpClientBuilder httpClientBuilder);  RestConnectionPoolImpl(MetricRegistry metricRegistry, int idleConnTimeout,
            @Nullable HttpClientBuilder httpClientBuilder,
            @Nullable PoolingHttpClientConnectionManager connectionManager); }
RestConnectionPoolImpl implements RestConnectionPool<T> { @Nonnull @Override public synchronized RestConnection getRestConnection(@Nonnull T orgId) { return new RestConnectionImpl(objectMapper.reader(), new PoolHttpApiClientProvider(orgId), metricRegistry); } RestConnectionPoolImpl(MetricRegistry metricRegistry);  RestConnectionPoolImpl(MetricRegistry metricRegistry, int idleConnTimeout);  RestConnectionPoolImpl(MetricRegistry metricRegistry, int idleConnTimeout,
            @Nullable HttpClientBuilder httpClientBuilder);  RestConnectionPoolImpl(MetricRegistry metricRegistry, int idleConnTimeout,
            @Nullable HttpClientBuilder httpClientBuilder,
            @Nullable PoolingHttpClientConnectionManager connectionManager); @Nonnull @Override synchronized RestConnection getRestConnection(@Nonnull T orgId); @Override synchronized void configureOrg(@Nonnull T orgId, @Nonnull String host, @Nonnull String token); @Nonnull @Override Runnable getExpiredConnectionTask(); }
RestConnectionPoolImpl implements RestConnectionPool<T> { @Nonnull @Override public synchronized RestConnection getRestConnection(@Nonnull T orgId) { return new RestConnectionImpl(objectMapper.reader(), new PoolHttpApiClientProvider(orgId), metricRegistry); } RestConnectionPoolImpl(MetricRegistry metricRegistry);  RestConnectionPoolImpl(MetricRegistry metricRegistry, int idleConnTimeout);  RestConnectionPoolImpl(MetricRegistry metricRegistry, int idleConnTimeout,
            @Nullable HttpClientBuilder httpClientBuilder);  RestConnectionPoolImpl(MetricRegistry metricRegistry, int idleConnTimeout,
            @Nullable HttpClientBuilder httpClientBuilder,
            @Nullable PoolingHttpClientConnectionManager connectionManager); @Nonnull @Override synchronized RestConnection getRestConnection(@Nonnull T orgId); @Override synchronized void configureOrg(@Nonnull T orgId, @Nonnull String host, @Nonnull String token); @Nonnull @Override Runnable getExpiredConnectionTask(); static final int DEFAULT_IDLE_CONN_TIMEOUT; }