@Override public void setSocketTimeout(final Timeout timeout) { this.socketTimeout = Timeout.defaultsToDisabled(timeout); }
@Override public void setSocketTimeout(final Timeout timeout) { this.socketTimeout = Timeout.defaultsToDisabled(timeout); }
public SocketConfig build() { return new SocketConfig( Timeout.defaultsToDisabled(soTimeout), soReuseAddress, soLinger != null ? soLinger : TimeValue.NEG_ONE_SECONDS, soKeepAlive, tcpNoDelay, sndBufSize, rcvBufSize, backlogSize); }
public SocketConfig build() { return new SocketConfig( Timeout.defaultsToDisabled(soTimeout), soReuseAddress, soLinger != null ? soLinger : TimeValue.NEG_ONE_SECONDS, soKeepAlive, tcpNoDelay, sndBufSize, rcvBufSize, backlogSize); }
@Override public void setSocketTimeout(final Timeout timeout) { final SocketHolder socketHolder = this.socketHolderRef.get(); if (socketHolder != null) { try { socketHolder.getSocket().setSoTimeout(Timeout.defaultsToDisabled(timeout).toMillisIntBound()); } catch (final SocketException ignore) { // It is not quite clear from the Sun's documentation if there are any // other legitimate cases for a socket exception to be thrown when setting // SO_TIMEOUT besides the socket being already closed } } }
@Override public void setSocketTimeout(final Timeout timeout) { final SocketHolder socketHolder = this.socketHolderRef.get(); if (socketHolder != null) { try { socketHolder.getSocket().setSoTimeout(Timeout.defaultsToDisabled(timeout).toMillisIntBound()); } catch (final SocketException ignore) { // It is not quite clear from the Sun's documentation if there are any // other legitimate cases for a socket exception to be thrown when setting // SO_TIMEOUT besides the socket being already closed } } }
public IOReactorConfig build() { return new IOReactorConfig( selectInterval != null ? selectInterval : TimeValue.ofSeconds(1), ioThreadCount, Timeout.defaultsToDisabled(soTimeout), soReuseAddress, TimeValue.defaultsToNegativeOneMillisecond(soLinger), soKeepAlive, tcpNoDelay, sndBufSize, rcvBufSize, backlogSize); }
public IOReactorConfig build() { return new IOReactorConfig( selectInterval != null ? selectInterval : TimeValue.ofSeconds(1), ioThreadCount, Timeout.defaultsToDisabled(soTimeout), soReuseAddress, TimeValue.defaultsToNegativeOneMillisecond(soLinger), soKeepAlive, tcpNoDelay, sndBufSize, rcvBufSize, backlogSize, socksProxyAddress, socksProxyUsername, socksProxyPassword); }
final Future<PoolEntry<HttpHost, HttpClientConnection>> leaseFuture = connPool.lease(targetHost, null, connectTimeout, null); final PoolEntry<HttpHost, HttpClientConnection> poolEntry; final Timeout timeout = Timeout.defaultsToDisabled(connectTimeout); try { poolEntry = leaseFuture.get(timeout.getDuration(), timeout.getTimeUnit());
final Future<PoolEntry<HttpHost, HttpClientConnection>> leaseFuture = connPool.lease(targetHost, null, connectTimeout, null); final PoolEntry<HttpHost, HttpClientConnection> poolEntry; final Timeout timeout = Timeout.defaultsToDisabled(connectTimeout); try { poolEntry = leaseFuture.get(timeout.getDuration(), timeout.getTimeUnit());