本文整理了Java中com.ning.http.client.AsyncHttpClientConfig.getConnectionTTL()
方法的一些代码示例,展示了AsyncHttpClientConfig.getConnectionTTL()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AsyncHttpClientConfig.getConnectionTTL()
方法的具体详情如下:
包路径:com.ning.http.client.AsyncHttpClientConfig
类名称:AsyncHttpClientConfig
方法名:getConnectionTTL
[英]Return the maximum time in millisecond an com.ning.http.client.AsyncHttpClient will keep connection in the pool, or -1 to keep connection while possible.
[中]返回com的最大时间(毫秒)。宁。http。客户AsyncHttpClient将在池中保持连接,或者-1在可能的情况下保持连接。
代码示例来源:origin: com.ning/async-http-client
public DefaultChannelPool(AsyncHttpClientConfig config, Timer hashedWheelTimer) {
this(config.getPooledConnectionIdleTimeout(),//
config.getConnectionTTL(),//
config.isAllowPoolingSslConnections(),//
hashedWheelTimer);
}
代码示例来源:origin: com.ning/async-http-client
readTimeout = prototype.getReadTimeout();
maxConnectionsPerHost = prototype.getMaxConnectionsPerHost();
connectionTTL = prototype.getConnectionTTL();
maxRedirects = prototype.getMaxRedirects();
maxConnections = prototype.getMaxConnections();
代码示例来源:origin: io.gatling/async-http-client
public DefaultChannelPool(AsyncHttpClientConfig config, Timer hashedWheelTimer) {
this(config.getPooledConnectionIdleTimeout(),//
config.getConnectionTTL(),//
config.isAllowPoolingSslConnections(),//
hashedWheelTimer);
}
代码示例来源:origin: io.gatling/async-http-client
public GrizzlyConnectionPool(final AsyncHttpClientConfig config) {
cacheSSLConnections = config.isAllowPoolingSslConnections();
timeout = config.getPooledConnectionIdleTimeout();
maxConnectionLifeTime = config.getConnectionTTL();
maxConnectionsPerHost = config.getMaxConnectionsPerHost();
maxConnections = config.getMaxConnections();
unlimitedConnections = (maxConnections == -1);
delayedExecutor = new DelayedExecutor(Executors.newSingleThreadExecutor(), this);
delayedExecutor.start();
ownsDelayedExecutor = true;
}
代码示例来源:origin: Nike-Inc/riposte
private void verifyDefaultUnderlyingClientConfig(AsyncHttpClientHelper instance) {
AsyncHttpClientConfig config = instance.asyncHttpClient.getConfig();
assertThat(config.isAllowPoolingConnections()).isTrue();
assertThat(config.getMaxRequestRetry()).isEqualTo(0);
assertThat(config.getRequestTimeout()).isEqualTo(DEFAULT_REQUEST_TIMEOUT_MILLIS);
assertThat(config.getConnectionTTL()).isEqualTo(DEFAULT_POOLED_DOWNSTREAM_CONNECTION_TTL_MILLIS);
assertThat(Whitebox.getInternalState(instance.asyncHttpClient, "signatureCalculator")).isNull();
}
代码示例来源:origin: com.ning/async-http-client
.keepAliveCheckInterval(1, TimeUnit.SECONDS)
.connectorHandler(defaultConnectionHandler)
.connectionTTL(config.getConnectionTTL(), TimeUnit.MILLISECONDS)
.failFastWhenMaxSizeReached(true);
代码示例来源:origin: spotify/async-google-pubsub-client
log.debug("accept any certificate: {}", config.isAcceptAnyCertificate());
log.debug("follows redirect: {}", config.isFollowRedirect());
log.debug("pooled connection TTL: {}", config.getConnectionTTL());
log.debug("pooled connection idle timeout: {}", config.getPooledConnectionIdleTimeout());
log.debug("pooling connections: {}", config.isAllowPoolingConnections());
代码示例来源:origin: io.gatling/async-http-client
readTimeout = prototype.getReadTimeout();
maxConnectionsPerHost = prototype.getMaxConnectionsPerHost();
connectionTTL = prototype.getConnectionTTL();
maxRedirects = prototype.getMaxRedirects();
maxConnections = prototype.getMaxConnections();
代码示例来源:origin: javaee/grizzly-ahc
readTimeout = prototype.getReadTimeout();
maxConnectionsPerHost = prototype.getMaxConnectionsPerHost();
connectionTTL = prototype.getConnectionTTL();
maxRedirects = prototype.getMaxRedirects();
maxConnections = prototype.getMaxConnections();
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client
readTimeout = prototype.getReadTimeout();
maxConnectionsPerHost = prototype.getMaxConnectionsPerHost();
connectionTTL = prototype.getConnectionTTL();
maxRedirects = prototype.getMaxRedirects();
maxConnections = prototype.getMaxConnections();
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client
.keepAliveCheckInterval(1, TimeUnit.SECONDS)
.connectorHandler(defaultConnectionHandler)
.connectionTTL(config.getConnectionTTL(), TimeUnit.MILLISECONDS)
.failFastWhenMaxSizeReached(true);
代码示例来源:origin: javaee/grizzly-ahc
.keepAliveCheckInterval(1, TimeUnit.SECONDS)
.connectorHandler(defaultConnectionHandler)
.connectionTTL(config.getConnectionTTL(), TimeUnit.MILLISECONDS)
.failFastWhenMaxSizeReached(true);
内容来源于网络,如有侵权,请联系作者删除!