@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: falsepublic void setInterestOpQueued(boolean interestOpQueued)
SelectionKey immediately.public int getIoThreadCount()
2public void setIoThreadCount(int ioThreadCount)
public int getSoTimeout()
0 (no timeout)SocketOptions.SO_TIMEOUTpublic void setSoTimeout(int soTimeout)
0 (no timeout)SocketOptions.SO_TIMEOUTpublic boolean isSoReuseAddress()
SocketOptions.SO_REUSEADDR parameter
for newly created sockets.
Default: falseSocketOptions.SO_REUSEADDRpublic void setSoReuseAddress(boolean soReuseAddress)
SocketOptions.SO_REUSEADDR parameter
for newly created sockets.SocketOptions.SO_REUSEADDRpublic int getSoLinger()
SocketOptions.SO_LINGER parameter
for newly created sockets.
Default: -1SocketOptions.SO_LINGERpublic void setSoLinger(int soLinger)
SocketOptions.SO_LINGER parameter
for newly created sockets.SocketOptions.SO_LINGERpublic boolean isSoKeepalive()
SocketOptions.SO_KEEPALIVE parameter
for newly created sockets.
Default: -1SocketOptions.SO_KEEPALIVEpublic void setSoKeepalive(boolean soKeepAlive)
SocketOptions.SO_KEEPALIVE parameter
for newly created sockets.
Default: -1SocketOptions.SO_KEEPALIVEpublic boolean isTcpNoDelay()
SocketOptions.TCP_NODELAY parameter
for newly created sockets.
Default: falseSocketOptions.TCP_NODELAYpublic void setTcpNoDelay(boolean tcpNoDelay)
SocketOptions.TCP_NODELAY parameter
for newly created sockets.SocketOptions.TCP_NODELAYpublic 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_SNDBUFpublic void setSndBufSize(int sndBufSize)
SocketOptions.SO_SNDBUF parameter
for newly created sockets.SocketOptions.SO_SNDBUFpublic int getRcvBufSize()
SocketOptions.SO_RCVBUF parameter
for newly created sockets.
Default: 0 (system default)SocketOptions.SO_RCVBUFpublic void setRcvBufSize(int rcvBufSize)
SocketOptions.SO_RCVBUF parameter
for newly created sockets.SocketOptions.SO_RCVBUFprotected IOReactorConfig clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionCopyright © 2005–2013 The Apache Software Foundation. All rights reserved.