public class SocketProperties
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
appReadBufSize
The application read buffer size in bytes.
|
protected int |
appWriteBufSize
The application write buffer size in bytes
Default value is txBufSize
|
protected int |
bufferPool
NioChannel pool size for the endpoint,
this value is how many channels
-1 means unlimited cached, 0 means no cache
Default value is 500
|
protected int |
bufferPoolSize
Buffer pool size in bytes to be cached
-1 means unlimited, 0 means no cache
Default value is 100MB (1024*1024*100 bytes)
|
protected boolean |
directBuffer
Enable/disable direct buffers for the network buffers
Default value is disabled
|
protected boolean |
directSslBuffer
Enable/disable direct buffers for the network buffers for SSL
Default value is disabled
|
protected int |
eventCache
Enable/disable poller event cache, this bounded cache stores
PollerEvent objects to reduce GC for the poller
Default is 500
-1 is unlimited
0 is disabled
>0 the max number of objects to keep in cache.
|
protected java.lang.Boolean |
ooBInline
OOBINLINE option.
|
protected java.lang.Integer |
performanceBandwidth
Performance preferences according to
http://docs.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)
All three performance attributes must be set or the JVM defaults will be
used.
|
protected java.lang.Integer |
performanceConnectionTime
Performance preferences according to
http://docs.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)
All three performance attributes must be set or the JVM defaults will be
used.
|
protected java.lang.Integer |
performanceLatency
Performance preferences according to
http://docs.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)
All three performance attributes must be set or the JVM defaults will be
used.
|
protected int |
processorCache
Enable/disable socket processor cache, this bounded cache stores
SocketProcessor objects to reduce GC
Default is 500
-1 is unlimited
0 is disabled
|
protected java.lang.Integer |
rxBufSize
Socket receive buffer size in bytes (SO_RCVBUF).
|
protected int |
socketWrapperCache
Enable/disable socket wrapper cache, this bounded cache stores
SocketWrapper objects to reduce GC
Default is 500
-1 is unlimited
0 is disabled
|
protected java.lang.Boolean |
soKeepAlive
SO_KEEPALIVE option.
|
protected java.lang.Boolean |
soLingerOn
SO_LINGER option, paired with the
soLingerTime value. |
protected java.lang.Integer |
soLingerTime
SO_LINGER option, paired with the
soLingerOn value. |
protected java.lang.Boolean |
soReuseAddress
SO_REUSEADDR option.
|
protected java.lang.Integer |
soTimeout
SO_TIMEOUT option. default is 20000.
|
protected java.lang.Boolean |
tcpNoDelay
TCP_NO_DELAY option.
|
protected long |
timeoutInterval
The minimum frequency of the timeout interval to avoid excess load from
the poller during high traffic
|
protected java.lang.Integer |
txBufSize
Socket send buffer size in bytes (SO_SNDBUF).
|
protected int |
unlockTimeout
Timeout in milliseconds for an unlock to take place.
|
Constructor and Description |
---|
SocketProperties() |
Modifier and Type | Method and Description |
---|---|
int |
getAppReadBufSize() |
int |
getAppWriteBufSize() |
int |
getBufferPool() |
int |
getBufferPoolSize() |
boolean |
getDirectBuffer() |
int |
getDirectBufferPool() |
boolean |
getDirectSslBuffer() |
int |
getEventCache() |
int |
getKeyCache() |
boolean |
getOoBInline() |
int |
getPerformanceBandwidth() |
int |
getPerformanceConnectionTime() |
int |
getPerformanceLatency() |
int |
getProcessorCache() |
int |
getRxBufSize() |
int |
getSocketWrapperCache() |
boolean |
getSoKeepAlive() |
boolean |
getSoLingerOn() |
int |
getSoLingerTime() |
boolean |
getSoReuseAddress() |
int |
getSoTimeout() |
boolean |
getTcpNoDelay() |
long |
getTimeoutInterval() |
int |
getTxBufSize() |
int |
getUnlockTimeout() |
void |
setAppReadBufSize(int appReadBufSize) |
void |
setAppWriteBufSize(int appWriteBufSize) |
void |
setBufferPool(int bufferPool) |
void |
setBufferPoolSize(int bufferPoolSize) |
void |
setDirectBuffer(boolean directBuffer) |
void |
setDirectBufferPool(int directBufferPool) |
void |
setDirectSslBuffer(boolean directSslBuffer) |
void |
setEventCache(int eventCache) |
void |
setKeyCache(int keyCache) |
void |
setOoBInline(boolean ooBInline) |
void |
setPerformanceBandwidth(int performanceBandwidth) |
void |
setPerformanceConnectionTime(int performanceConnectionTime) |
void |
setPerformanceLatency(int performanceLatency) |
void |
setProcessorCache(int processorCache) |
void |
setProperties(java.nio.channels.AsynchronousServerSocketChannel socket) |
void |
setProperties(java.nio.channels.AsynchronousSocketChannel socket) |
void |
setProperties(java.net.ServerSocket socket) |
void |
setProperties(java.net.Socket socket) |
void |
setRxBufSize(int rxBufSize) |
void |
setSocketWrapperCache(int socketWrapperCache) |
void |
setSoKeepAlive(boolean soKeepAlive) |
void |
setSoLingerOn(boolean soLingerOn) |
void |
setSoLingerTime(int soLingerTime) |
void |
setSoReuseAddress(boolean soReuseAddress) |
void |
setSoTimeout(int soTimeout) |
void |
setTcpNoDelay(boolean tcpNoDelay) |
void |
setTimeoutInterval(long timeoutInterval) |
void |
setTxBufSize(int txBufSize) |
void |
setUnlockTimeout(int unlockTimeout) |
protected int socketWrapperCache
protected int processorCache
protected int eventCache
protected boolean directBuffer
protected boolean directSslBuffer
protected java.lang.Integer rxBufSize
protected java.lang.Integer txBufSize
protected int appReadBufSize
protected int appWriteBufSize
protected int bufferPool
protected int bufferPoolSize
protected java.lang.Boolean tcpNoDelay
protected java.lang.Boolean soKeepAlive
protected java.lang.Boolean ooBInline
protected java.lang.Boolean soReuseAddress
protected java.lang.Boolean soLingerOn
soLingerTime
value.
JVM defaults used unless both attributes are set.protected java.lang.Integer soLingerTime
soLingerOn
value.
JVM defaults used unless both attributes are set.protected java.lang.Integer soTimeout
protected java.lang.Integer performanceConnectionTime
protected java.lang.Integer performanceLatency
protected java.lang.Integer performanceBandwidth
protected long timeoutInterval
protected int unlockTimeout
public void setProperties(java.net.Socket socket) throws java.net.SocketException
java.net.SocketException
public void setProperties(java.net.ServerSocket socket) throws java.net.SocketException
java.net.SocketException
public void setProperties(java.nio.channels.AsynchronousSocketChannel socket) throws java.io.IOException
java.io.IOException
public void setProperties(java.nio.channels.AsynchronousServerSocketChannel socket) throws java.io.IOException
java.io.IOException
public boolean getDirectBuffer()
public boolean getDirectSslBuffer()
public boolean getOoBInline()
public int getPerformanceBandwidth()
public int getPerformanceConnectionTime()
public int getPerformanceLatency()
public int getRxBufSize()
public boolean getSoKeepAlive()
public boolean getSoLingerOn()
public int getSoLingerTime()
public boolean getSoReuseAddress()
public int getSoTimeout()
public boolean getTcpNoDelay()
public int getTxBufSize()
public int getBufferPool()
public int getBufferPoolSize()
public int getEventCache()
public int getKeyCache()
public int getSocketWrapperCache()
public int getAppReadBufSize()
public int getAppWriteBufSize()
public int getProcessorCache()
public long getTimeoutInterval()
public int getDirectBufferPool()
public void setPerformanceConnectionTime(int performanceConnectionTime)
public void setTxBufSize(int txBufSize)
public void setTcpNoDelay(boolean tcpNoDelay)
public void setSoTimeout(int soTimeout)
public void setSoReuseAddress(boolean soReuseAddress)
public void setSoLingerTime(int soLingerTime)
public void setSoKeepAlive(boolean soKeepAlive)
public void setRxBufSize(int rxBufSize)
public void setPerformanceLatency(int performanceLatency)
public void setPerformanceBandwidth(int performanceBandwidth)
public void setOoBInline(boolean ooBInline)
public void setDirectBuffer(boolean directBuffer)
public void setDirectSslBuffer(boolean directSslBuffer)
public void setSoLingerOn(boolean soLingerOn)
public void setBufferPool(int bufferPool)
public void setBufferPoolSize(int bufferPoolSize)
public void setEventCache(int eventCache)
public void setSocketWrapperCache(int socketWrapperCache)
public void setKeyCache(int keyCache)
public void setAppReadBufSize(int appReadBufSize)
public void setAppWriteBufSize(int appWriteBufSize)
public void setProcessorCache(int processorCache)
public void setTimeoutInterval(long timeoutInterval)
public void setDirectBufferPool(int directBufferPool)
public int getUnlockTimeout()
public void setUnlockTimeout(int unlockTimeout)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.