public static class IOReactorConfig.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
IOReactorConfig |
build() |
static int |
getDefaultMaxIOThreadCount()
Gets the default value for
ioThreadCount. |
IOReactorConfig.Builder |
setBacklogSize(int backlogSize)
Determines the default backlog size value for server sockets binds.
|
static void |
setDefaultMaxIOThreadCount(int defaultMaxIOThreadCount)
Sets the default value for
ioThreadCount. |
IOReactorConfig.Builder |
setIoThreadCount(int ioThreadCount)
Determines the number of I/O dispatch threads to be used by the I/O reactor.
|
IOReactorConfig.Builder |
setRcvBufSize(int rcvBufSize)
Determines the default value of the
SocketOptions.SO_RCVBUF parameter
for newly created sockets. |
IOReactorConfig.Builder |
setSelectInterval(TimeValue selectInterval)
Determines time interval at which the I/O reactor wakes up to check for timed out sessions
and session requests.
|
IOReactorConfig.Builder |
setSndBufSize(int sndBufSize)
Determines the default value of the
SocketOptions.SO_SNDBUF parameter
for newly created sockets. |
IOReactorConfig.Builder |
setSocksProxyAddress(SocketAddress socksProxyAddress)
The address of the SOCKS proxy to use.
|
IOReactorConfig.Builder |
setSocksProxyPassword(String socksProxyPassword)
The password to provide to the SOCKS proxy for username/password authentication.
|
IOReactorConfig.Builder |
setSocksProxyUsername(String socksProxyUsername)
The username to provide to the SOCKS proxy for username/password authentication.
|
IOReactorConfig.Builder |
setSoKeepAlive(boolean soKeepAlive)
Determines the default value of the
SocketOptions.SO_KEEPALIVE parameter
for newly created sockets. |
IOReactorConfig.Builder |
setSoLinger(int soLinger,
TimeUnit timeUnit)
Determines the default value of the
SocketOptions.SO_LINGER parameter
for newly created sockets. |
IOReactorConfig.Builder |
setSoLinger(TimeValue soLinger)
Determines the default value of the
SocketOptions.SO_LINGER parameter
for newly created sockets. |
IOReactorConfig.Builder |
setSoReuseAddress(boolean soReuseAddress)
Determines the default value of the
SocketOptions.SO_REUSEADDR parameter
for newly created sockets. |
IOReactorConfig.Builder |
setSoTimeout(int soTimeout,
TimeUnit timeUnit)
Determines the default socket timeout value for non-blocking I/O operations.
|
IOReactorConfig.Builder |
setSoTimeout(Timeout soTimeout)
Determines the default socket timeout value for non-blocking I/O operations.
|
IOReactorConfig.Builder |
setTcpNoDelay(boolean tcpNoDelay)
Determines the default value of the
SocketOptions.TCP_NODELAY parameter
for newly created sockets. |
public static int getDefaultMaxIOThreadCount()
ioThreadCount. Returns
Runtime.availableProcessors() if
setDefaultMaxIOThreadCount(int) was called with a value less <= 0.public static void setDefaultMaxIOThreadCount(int defaultMaxIOThreadCount)
ioThreadCount. Use a value <= 0 to
cause getDefaultMaxIOThreadCount() to return
Runtime.availableProcessors().defaultMaxIOThreadCount - the default value for ioThreadCount.public IOReactorConfig.Builder setSelectInterval(TimeValue selectInterval)
Default: 1000 milliseconds.
public IOReactorConfig.Builder setIoThreadCount(int ioThreadCount)
Default: 2
public IOReactorConfig.Builder setSoTimeout(int soTimeout, TimeUnit timeUnit)
Default: 0 (no timeout)
SocketOptions.SO_TIMEOUTpublic IOReactorConfig.Builder setSoTimeout(Timeout soTimeout)
Default: 0 (no timeout)
SocketOptions.SO_TIMEOUTpublic IOReactorConfig.Builder setSoReuseAddress(boolean soReuseAddress)
SocketOptions.SO_REUSEADDR parameter
for newly created sockets.
Default: false
SocketOptions.SO_REUSEADDRpublic IOReactorConfig.Builder setSoLinger(int soLinger, TimeUnit timeUnit)
SocketOptions.SO_LINGER parameter
for newly created sockets.
Default: -1
SocketOptions.SO_LINGERpublic IOReactorConfig.Builder setSoLinger(TimeValue soLinger)
SocketOptions.SO_LINGER parameter
for newly created sockets.
Default: -1
SocketOptions.SO_LINGERpublic IOReactorConfig.Builder setSoKeepAlive(boolean soKeepAlive)
SocketOptions.SO_KEEPALIVE parameter
for newly created sockets.
Default: -1
SocketOptions.SO_KEEPALIVEpublic IOReactorConfig.Builder setTcpNoDelay(boolean tcpNoDelay)
SocketOptions.TCP_NODELAY parameter
for newly created sockets.
Default: false
SocketOptions.TCP_NODELAYpublic IOReactorConfig.Builder setSndBufSize(int sndBufSize)
SocketOptions.SO_SNDBUF parameter
for newly created sockets.
Default: 0 (system default)
SocketOptions.SO_SNDBUFpublic IOReactorConfig.Builder setRcvBufSize(int rcvBufSize)
SocketOptions.SO_RCVBUF parameter
for newly created sockets.
Default: 0 (system default)
SocketOptions.SO_RCVBUFpublic IOReactorConfig.Builder setBacklogSize(int backlogSize)
Default: 0 (system default)
public IOReactorConfig.Builder setSocksProxyAddress(SocketAddress socksProxyAddress)
public IOReactorConfig.Builder setSocksProxyUsername(String socksProxyUsername)
public IOReactorConfig.Builder setSocksProxyPassword(String socksProxyPassword)
public IOReactorConfig build()
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.