Package org.apache.hc.core5.reactor
Class IOReactorConfig.Builder
java.lang.Object
org.apache.hc.core5.reactor.IOReactorConfig.Builder
- Enclosing class:
- IOReactorConfig
-
Method Summary
Modifier and TypeMethodDescriptionbuild()static intGets the default value forioThreadCount.setBacklogSize(int backlogSize) Sets the default backlog size value for server sockets binds.static voidsetDefaultMaxIOThreadCount(int defaultMaxIOThreadCount) Sets the default value forioThreadCount.setIoThreadCount(int ioThreadCount) Sets the number of I/O dispatch threads to be used by the I/O reactor.setRcvBufSize(int rcvBufSize) Sets the default value of theSocketOptions.SO_RCVBUFparameter for newly created sockets.setSelectInterval(TimeValue selectInterval) Sets time interval at which the I/O reactor wakes up to check for timed out sessions and session requests.setSndBufSize(int sndBufSize) Sets the default value of theSocketOptions.SO_SNDBUFparameter for newly created sockets.setSocksProxyAddress(SocketAddress socksProxyAddress) Sets the address of the SOCKS proxy to use.setSocksProxyPassword(String socksProxyPassword) Sets the password to provide to the SOCKS proxy for username/password authentication.setSocksProxyUsername(String socksProxyUsername) Sets the username to provide to the SOCKS proxy for username/password authentication.setSoKeepAlive(boolean soKeepAlive) Sets the default value of theSocketOptions.SO_KEEPALIVEparameter for newly created sockets.setSoLinger(int soLinger, TimeUnit timeUnit) Sets the default value of theSocketOptions.SO_LINGERparameter for newly created sockets.setSoLinger(TimeValue soLinger) Sets the default value of theSocketOptions.SO_LINGERparameter for newly created sockets.setSoReuseAddress(boolean soReuseAddress) Sets the default value of theSocketOptions.SO_REUSEADDRparameter for newly created sockets.setSoTimeout(int soTimeout, TimeUnit timeUnit) Sets the default socket timeout value for non-blocking I/O operations.setSoTimeout(Timeout soTimeout) Sets the default socket timeout value for non-blocking I/O operations.setTcpKeepCount(int tcpKeepCount) Sets the maximum number of keepalive probes TCP should send before dropping the connection.setTcpKeepIdle(int tcpKeepIdle) Sets the time (in seconds) the connection needs to remain idle before TCP starts sending keepalive probes.setTcpKeepInterval(int tcpKeepInterval) Sets the time (in seconds) between individual keepalive probes.setTcpNoDelay(boolean tcpNoDelay) Sets the default value of theSocketOptions.TCP_NODELAYparameter for newly created sockets.setTrafficClass(int trafficClass) Sets the default value of theSocketOptions.IP_TOSparameter for newly created sockets.
-
Method Details
-
getDefaultMaxIOThreadCount
public static int getDefaultMaxIOThreadCount()Gets the default value forioThreadCount. ReturnsRuntime.availableProcessors()ifsetDefaultMaxIOThreadCount(int)was called with a value less <= 0.- Returns:
- the default value for ioThreadCount.
- Since:
- 4.4.10
-
setDefaultMaxIOThreadCount
public static void setDefaultMaxIOThreadCount(int defaultMaxIOThreadCount) Sets the default value forioThreadCount. Use a value <= 0 to causegetDefaultMaxIOThreadCount()to returnRuntime.availableProcessors().- Parameters:
defaultMaxIOThreadCount- the default value for ioThreadCount.- Since:
- 4.4.10
-
setSelectInterval
Sets time interval at which the I/O reactor wakes up to check for timed out sessions and session requests.Default:
1000milliseconds.- Returns:
- this instance.
-
setIoThreadCount
Sets the number of I/O dispatch threads to be used by the I/O reactor.Default:
2- Returns:
- this instance.
-
setSoTimeout
Sets the default socket timeout value for non-blocking I/O operations.Default:
0(no timeout)- Returns:
- this instance.
- See Also:
-
setSoTimeout
Sets the default socket timeout value for non-blocking I/O operations.Default:
0(no timeout)- Returns:
- this instance.
- See Also:
-
setSoReuseAddress
Sets the default value of theSocketOptions.SO_REUSEADDRparameter for newly created sockets.Default:
false- Returns:
- this instance.
- See Also:
-
setSoLinger
Sets the default value of theSocketOptions.SO_LINGERparameter for newly created sockets.Default:
-1- Returns:
- this instance.
- See Also:
-
setSoLinger
Sets the default value of theSocketOptions.SO_LINGERparameter for newly created sockets.Default:
-1- Returns:
- this instance.
- See Also:
-
setSoKeepAlive
Sets the default value of theSocketOptions.SO_KEEPALIVEparameter for newly created sockets.Default:
true- Returns:
- this instance.
- See Also:
-
setTcpNoDelay
Sets the default value of theSocketOptions.TCP_NODELAYparameter for newly created sockets.Default:
false- Returns:
- this instance.
- See Also:
-
setTrafficClass
Sets the default value of theSocketOptions.IP_TOSparameter for newly created sockets.Default:
0- Returns:
- this instance.
- Since:
- 5.1
- See Also:
-
setSndBufSize
Sets the default value of theSocketOptions.SO_SNDBUFparameter for newly created sockets.Default:
0(system default)- Returns:
- this instance.
- See Also:
-
setRcvBufSize
Sets the default value of theSocketOptions.SO_RCVBUFparameter for newly created sockets.Default:
0(system default)- Returns:
- this instance.
- See Also:
-
setBacklogSize
Sets the default backlog size value for server sockets binds.Default:
0(system default)- Returns:
- this instance.
- Since:
- 4.4
-
setTcpKeepIdle
Sets the time (in seconds) the connection needs to remain idle before TCP starts sending keepalive probes.Default:
5- Returns:
- this instance.
- Since:
- 5.3
-
setTcpKeepInterval
Sets the time (in seconds) between individual keepalive probes.Default:
5- Returns:
- this instance.
- Since:
- 5.3
-
setTcpKeepCount
Sets the maximum number of keepalive probes TCP should send before dropping the connection.Default:
3- Returns:
- this instance.
- Since:
- 5.3
-
setSocksProxyAddress
Sets the address of the SOCKS proxy to use.- Returns:
- this instance.
-
setSocksProxyUsername
Sets the username to provide to the SOCKS proxy for username/password authentication.- Returns:
- this instance.
-
setSocksProxyPassword
Sets the password to provide to the SOCKS proxy for username/password authentication.- Returns:
- this instance.
-
build
-