public final class IOReactorConfig extends Object implements Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
IOReactorConfig.Builder |
Modifier and Type | Field and Description |
---|---|
private static int |
AVAIL_PROCS |
private int |
backlogSize |
private int |
connectTimeout |
static IOReactorConfig |
DEFAULT |
private boolean |
interestOpQueued |
private int |
ioThreadCount |
private int |
rcvBufSize |
private long |
selectInterval |
private long |
shutdownGracePeriod |
private int |
sndBufSize |
private boolean |
soKeepAlive |
private int |
soLinger |
private boolean |
soReuseAddress |
private int |
soTimeout |
private boolean |
tcpNoDelay |
Constructor and Description |
---|
IOReactorConfig()
Deprecated.
|
IOReactorConfig(long selectInterval,
long shutdownGracePeriod,
boolean interestOpQueued,
int ioThreadCount,
int soTimeout,
boolean soReuseAddress,
int soLinger,
boolean soKeepAlive,
boolean tcpNoDelay,
int connectTimeout,
int sndBufSize,
int rcvBufSize,
int backlogSize) |
Modifier and Type | Method and Description |
---|---|
protected IOReactorConfig |
clone() |
static IOReactorConfig.Builder |
copy(IOReactorConfig config) |
static IOReactorConfig.Builder |
custom() |
int |
getBacklogSize()
Determines the default backlog size value for server sockets binds.
|
int |
getConnectTimeout()
Determines the default connect timeout value for non-blocking connection requests.
|
int |
getIoThreadCount()
Determines the number of I/O dispatch threads to be used by the I/O reactor.
|
int |
getRcvBufSize()
Determines the default value of the
SocketOptions.SO_RCVBUF parameter
for newly created sockets. |
long |
getSelectInterval()
Determines time interval in milliseconds at which the I/O reactor wakes up to check for
timed out sessions and session requests.
|
long |
getShutdownGracePeriod()
Determines grace period in milliseconds the I/O reactors are expected to block waiting
for individual worker threads to terminate cleanly.
|
int |
getSndBufSize()
Determines the default value of the
SocketOptions.SO_SNDBUF parameter
for newly created sockets. |
int |
getSoLinger()
Determines the default value of the
SocketOptions.SO_LINGER parameter
for newly created sockets. |
int |
getSoTimeout()
Determines the default socket timeout value for non-blocking I/O operations.
|
boolean |
isInterestOpQueued()
Determines whether or not I/O interest operations are to be queued and executed
asynchronously by the I/O reactor thread or to be applied to the underlying
SelectionKey immediately. |
boolean |
isSoKeepalive()
Determines the default value of the
SocketOptions.SO_KEEPALIVE parameter
for newly created sockets. |
boolean |
isSoReuseAddress()
Determines the default value of the
SocketOptions.SO_REUSEADDR parameter
for newly created sockets. |
boolean |
isTcpNoDelay()
Determines the default value of the
SocketOptions.TCP_NODELAY parameter
for newly created sockets. |
void |
setConnectTimeout(int connectTimeout)
Deprecated.
|
void |
setInterestOpQueued(boolean interestOpQueued)
Deprecated.
|
void |
setIoThreadCount(int ioThreadCount)
Deprecated.
|
void |
setRcvBufSize(int rcvBufSize)
Deprecated.
|
void |
setSelectInterval(long selectInterval)
Deprecated.
|
void |
setShutdownGracePeriod(long gracePeriod)
Deprecated.
|
void |
setSndBufSize(int sndBufSize)
Deprecated.
|
void |
setSoKeepalive(boolean soKeepAlive)
Deprecated.
|
void |
setSoLinger(int soLinger)
Deprecated.
(4.3) use
IOReactorConfig.Builder.setSoLinger(int) |
void |
setSoReuseAddress(boolean soReuseAddress)
Deprecated.
|
void |
setSoTimeout(int soTimeout)
Deprecated.
|
void |
setTcpNoDelay(boolean tcpNoDelay)
Deprecated.
|
String |
toString() |
private static final int AVAIL_PROCS
public static final IOReactorConfig DEFAULT
private long selectInterval
private long shutdownGracePeriod
private boolean interestOpQueued
private int ioThreadCount
private int soTimeout
private boolean soReuseAddress
private int soLinger
private boolean soKeepAlive
private boolean tcpNoDelay
private int connectTimeout
private int sndBufSize
private int rcvBufSize
private final int backlogSize
@Deprecated public IOReactorConfig()
IOReactorConfig(long selectInterval, long shutdownGracePeriod, boolean interestOpQueued, int ioThreadCount, int soTimeout, boolean soReuseAddress, int soLinger, boolean soKeepAlive, boolean tcpNoDelay, int connectTimeout, int sndBufSize, int rcvBufSize, int backlogSize)
public long getSelectInterval()
Default: 1000
milliseconds.
@Deprecated public void setSelectInterval(long selectInterval)
IOReactorConfig.Builder.setSelectInterval(long)
public long getShutdownGracePeriod()
Default: 500
milliseconds.
@Deprecated public void setShutdownGracePeriod(long gracePeriod)
IOReactorConfig.Builder.setShutdownGracePeriod(long)
public boolean isInterestOpQueued()
SelectionKey
immediately.
Default: false
@Deprecated public void setInterestOpQueued(boolean interestOpQueued)
IOReactorConfig.Builder.setInterestOpQueued(boolean)
public int getIoThreadCount()
Default: 2
@Deprecated public void setIoThreadCount(int ioThreadCount)
IOReactorConfig.Builder.setIoThreadCount(int)
public int getSoTimeout()
Default: 0
(no timeout)
SocketOptions.SO_TIMEOUT
@Deprecated public void setSoTimeout(int soTimeout)
IOReactorConfig.Builder.setSoTimeout(int)
public boolean isSoReuseAddress()
SocketOptions.SO_REUSEADDR
parameter
for newly created sockets.
Default: false
SocketOptions.SO_REUSEADDR
@Deprecated public void setSoReuseAddress(boolean soReuseAddress)
IOReactorConfig.Builder.setSoReuseAddress(boolean)
public int getSoLinger()
SocketOptions.SO_LINGER
parameter
for newly created sockets.
Default: -1
SocketOptions.SO_LINGER
@Deprecated public void setSoLinger(int soLinger)
IOReactorConfig.Builder.setSoLinger(int)
public boolean isSoKeepalive()
SocketOptions.SO_KEEPALIVE
parameter
for newly created sockets.
Default: -1
SocketOptions.SO_KEEPALIVE
@Deprecated public void setSoKeepalive(boolean soKeepAlive)
IOReactorConfig.Builder.setSoKeepAlive(boolean)
public boolean isTcpNoDelay()
SocketOptions.TCP_NODELAY
parameter
for newly created sockets.
Default: false
SocketOptions.TCP_NODELAY
@Deprecated public void setTcpNoDelay(boolean tcpNoDelay)
IOReactorConfig.Builder.setTcpNoDelay(boolean)
public int getConnectTimeout()
Default: 0
(no timeout)
@Deprecated public void setConnectTimeout(int connectTimeout)
IOReactorConfig.Builder.setConnectTimeout(int)
public int getSndBufSize()
SocketOptions.SO_SNDBUF
parameter
for newly created sockets.
Default: 0
(system default)
SocketOptions.SO_SNDBUF
@Deprecated public void setSndBufSize(int sndBufSize)
IOReactorConfig.Builder.setSndBufSize(int)
public int getRcvBufSize()
SocketOptions.SO_RCVBUF
parameter
for newly created sockets.
Default: 0
(system default)
SocketOptions.SO_RCVBUF
@Deprecated public void setRcvBufSize(int rcvBufSize)
IOReactorConfig.Builder.setRcvBufSize(int)
public int getBacklogSize()
Default: 0
(system default)
protected IOReactorConfig clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public static IOReactorConfig.Builder custom()
public static IOReactorConfig.Builder copy(IOReactorConfig config)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses