Package org.apache.hc.core5.reactor
Class IOReactorConfig.Builder
java.lang.Object
org.apache.hc.core5.reactor.IOReactorConfig.Builder
- Enclosing class:
IOReactorConfig
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
static int
Gets the default value forioThreadCount
.setBacklogSize
(int backlogSize) Determines the default backlog size value for server sockets binds.static void
setDefaultMaxIOThreadCount
(int defaultMaxIOThreadCount) Sets the default value forioThreadCount
.setIoThreadCount
(int ioThreadCount) Determines the number of I/O dispatch threads to be used by the I/O reactor.setRcvBufSize
(int rcvBufSize) Determines the default value of theSocketOptions.SO_RCVBUF
parameter for newly created sockets.setSelectInterval
(TimeValue selectInterval) Determines time interval at which the I/O reactor wakes up to check for timed out sessions and session requests.setSndBufSize
(int sndBufSize) Determines the default value of theSocketOptions.SO_SNDBUF
parameter for newly created sockets.setSocksProxyAddress
(SocketAddress socksProxyAddress) The address of the SOCKS proxy to use.setSocksProxyPassword
(String socksProxyPassword) The password to provide to the SOCKS proxy for username/password authentication.setSocksProxyUsername
(String socksProxyUsername) The username to provide to the SOCKS proxy for username/password authentication.setSoKeepAlive
(boolean soKeepAlive) Determines the default value of theSocketOptions.SO_KEEPALIVE
parameter for newly created sockets.setSoLinger
(int soLinger, TimeUnit timeUnit) Determines the default value of theSocketOptions.SO_LINGER
parameter for newly created sockets.setSoLinger
(TimeValue soLinger) Determines the default value of theSocketOptions.SO_LINGER
parameter for newly created sockets.setSoReuseAddress
(boolean soReuseAddress) Determines the default value of theSocketOptions.SO_REUSEADDR
parameter for newly created sockets.setSoTimeout
(int soTimeout, TimeUnit timeUnit) Determines the default socket timeout value for non-blocking I/O operations.setSoTimeout
(Timeout soTimeout) Determines the default socket timeout value for non-blocking I/O operations.setTcpNoDelay
(boolean tcpNoDelay) Determines the default value of theSocketOptions.TCP_NODELAY
parameter for newly created sockets.setTrafficClass
(int trafficClass) Determines the default value of theSocketOptions.IP_TOS
parameter for newly created sockets.
-
Field Details
-
defaultMaxIOThreadCount
private static int defaultMaxIOThreadCount -
selectInterval
-
ioThreadCount
private int ioThreadCount -
soTimeout
-
soReuseAddress
private boolean soReuseAddress -
soLinger
-
soKeepAlive
private boolean soKeepAlive -
tcpNoDelay
private boolean tcpNoDelay -
trafficClass
private int trafficClass -
sndBufSize
private int sndBufSize -
rcvBufSize
private int rcvBufSize -
backlogSize
private int backlogSize -
socksProxyAddress
-
socksProxyUsername
-
socksProxyPassword
-
-
Constructor Details
-
Builder
Builder()
-
-
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
Determines time interval at which the I/O reactor wakes up to check for timed out sessions and session requests.Default:
1000
milliseconds. -
setIoThreadCount
Determines the number of I/O dispatch threads to be used by the I/O reactor.Default:
2
-
setSoTimeout
Determines the default socket timeout value for non-blocking I/O operations.Default:
0
(no timeout)- See Also:
-
setSoTimeout
Determines the default socket timeout value for non-blocking I/O operations.Default:
0
(no timeout)- See Also:
-
setSoReuseAddress
Determines the default value of theSocketOptions.SO_REUSEADDR
parameter for newly created sockets.Default:
false
- See Also:
-
setSoLinger
Determines the default value of theSocketOptions.SO_LINGER
parameter for newly created sockets.Default:
-1
- See Also:
-
setSoLinger
Determines the default value of theSocketOptions.SO_LINGER
parameter for newly created sockets.Default:
-1
- See Also:
-
setSoKeepAlive
Determines the default value of theSocketOptions.SO_KEEPALIVE
parameter for newly created sockets.Default:
-1
- See Also:
-
setTcpNoDelay
Determines the default value of theSocketOptions.TCP_NODELAY
parameter for newly created sockets.Default:
false
- See Also:
-
setTrafficClass
Determines the default value of theSocketOptions.IP_TOS
parameter for newly created sockets.Default:
0
- Since:
- 5.1
- See Also:
-
setSndBufSize
Determines the default value of theSocketOptions.SO_SNDBUF
parameter for newly created sockets.Default:
0
(system default)- See Also:
-
setRcvBufSize
Determines the default value of theSocketOptions.SO_RCVBUF
parameter for newly created sockets.Default:
0
(system default)- See Also:
-
setBacklogSize
Determines the default backlog size value for server sockets binds.Default:
0
(system default)- Since:
- 4.4
-
setSocksProxyAddress
The address of the SOCKS proxy to use. -
setSocksProxyUsername
The username to provide to the SOCKS proxy for username/password authentication. -
setSocksProxyPassword
The password to provide to the SOCKS proxy for username/password authentication. -
build
-