@NotThreadSafe public final class IOReactorConfig extends Object implements Cloneable
Constructor and Description |
---|
IOReactorConfig() |
Modifier and Type | Method and Description |
---|---|
protected IOReactorConfig |
clone() |
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)
Defines the default connect timeout value for non-blocking connection requests.
|
void |
setInterestOpQueued(boolean interestOpQueued)
Defines 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. |
void |
setIoThreadCount(int ioThreadCount)
Defines the number of I/O dispatch threads to be used by the I/O reactor.
|
void |
setRcvBufSize(int rcvBufSize)
Defines the default value of the
SocketOptions.SO_RCVBUF parameter
for newly created sockets. |
void |
setSelectInterval(long selectInterval)
Defines time interval in milliseconds at which the I/O reactor wakes up to check for
timed out sessions and session requests.
|
void |
setShutdownGracePeriod(long gracePeriod)
Defines grace period in milliseconds the I/O reactors are expected to block waiting
for individual worker threads to terminate cleanly.
|
void |
setSndBufSize(int sndBufSize)
Defines the default value of the
SocketOptions.SO_SNDBUF parameter
for newly created sockets. |
void |
setSoKeepalive(boolean soKeepAlive)
Defines the default value of the
SocketOptions.SO_KEEPALIVE parameter
for newly created sockets. |
void |
setSoLinger(int soLinger)
Defines the default value of the
SocketOptions.SO_LINGER parameter
for newly created sockets. |
void |
setSoReuseAddress(boolean soReuseAddress)
Defines the default value of the
SocketOptions.SO_REUSEADDR parameter
for newly created sockets. |
void |
setSoTimeout(int soTimeout)
Defines the default socket timeout value for non-blocking I/O operations.
|
void |
setTcpNoDelay(boolean tcpNoDelay)
Defines the default value of the
SocketOptions.TCP_NODELAY parameter
for newly created sockets. |
String |
toString() |
public long getSelectInterval()
1000
milliseconds.public void setSelectInterval(long selectInterval)
public long getShutdownGracePeriod()
500
milliseconds.public void setShutdownGracePeriod(long gracePeriod)
public boolean isInterestOpQueued()
SelectionKey
immediately.
Default: false
public void setInterestOpQueued(boolean interestOpQueued)
SelectionKey
immediately.public int getIoThreadCount()
2
public void setIoThreadCount(int ioThreadCount)
public int getSoTimeout()
0
(no timeout)SocketOptions.SO_TIMEOUT
public void setSoTimeout(int soTimeout)
0
(no timeout)SocketOptions.SO_TIMEOUT
public boolean isSoReuseAddress()
SocketOptions.SO_REUSEADDR
parameter
for newly created sockets.
Default: false
SocketOptions.SO_REUSEADDR
public void setSoReuseAddress(boolean soReuseAddress)
SocketOptions.SO_REUSEADDR
parameter
for newly created sockets.SocketOptions.SO_REUSEADDR
public int getSoLinger()
SocketOptions.SO_LINGER
parameter
for newly created sockets.
Default: -1
SocketOptions.SO_LINGER
public void setSoLinger(int soLinger)
SocketOptions.SO_LINGER
parameter
for newly created sockets.SocketOptions.SO_LINGER
public boolean isSoKeepalive()
SocketOptions.SO_KEEPALIVE
parameter
for newly created sockets.
Default: -1
SocketOptions.SO_KEEPALIVE
public void setSoKeepalive(boolean soKeepAlive)
SocketOptions.SO_KEEPALIVE
parameter
for newly created sockets.
Default: -1
SocketOptions.SO_KEEPALIVE
public boolean isTcpNoDelay()
SocketOptions.TCP_NODELAY
parameter
for newly created sockets.
Default: false
SocketOptions.TCP_NODELAY
public void setTcpNoDelay(boolean tcpNoDelay)
SocketOptions.TCP_NODELAY
parameter
for newly created sockets.SocketOptions.TCP_NODELAY
public int getConnectTimeout()
0
(no timeout)public void setConnectTimeout(int connectTimeout)
public int getSndBufSize()
SocketOptions.SO_SNDBUF
parameter
for newly created sockets.
Default: 0
(system default)SocketOptions.SO_SNDBUF
public void setSndBufSize(int sndBufSize)
SocketOptions.SO_SNDBUF
parameter
for newly created sockets.SocketOptions.SO_SNDBUF
public int getRcvBufSize()
SocketOptions.SO_RCVBUF
parameter
for newly created sockets.
Default: 0
(system default)SocketOptions.SO_RCVBUF
public void setRcvBufSize(int rcvBufSize)
SocketOptions.SO_RCVBUF
parameter
for newly created sockets.SocketOptions.SO_RCVBUF
protected IOReactorConfig clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2005-2015 The Apache Software Foundation. All Rights Reserved.