Package org.apache.tomcat.util.net
Class SocketProperties
- java.lang.Object
- 
- org.apache.tomcat.util.net.SocketProperties
 
- 
 public class SocketProperties extends java.lang.ObjectProperties that can be set in the <Connector> element in server.xml. All properties are prefixed with "socket." and are currently only working for the Nio connector
- 
- 
Field SummaryFields Modifier and Type Field Description protected intappReadBufSizeThe application read buffer size in bytes.protected intappWriteBufSizeThe application write buffer size in bytes Default value is txBufSizeprotected intbufferPoolNioChannel pool size for the endpoint, this value is how many channels -1 means unlimited cached, 0 means no cache Default value is 500protected intbufferPoolSizeBuffer pool size in bytes to be cached -1 means unlimited, 0 means no cache Default value is 100MB (1024*1024*100 bytes)protected booleandirectBufferEnable/disable direct buffers for the network buffers Default value is disabledprotected booleandirectSslBufferEnable/disable direct buffers for the network buffers for SSL Default value is disabledprotected inteventCacheEnable/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.BooleanooBInlineOOBINLINE option.protected java.lang.IntegerperformanceBandwidthPerformance 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.IntegerperformanceConnectionTimePerformance 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.IntegerperformanceLatencyPerformance 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 intprocessorCacheEnable/disable socket processor cache, this bounded cache stores SocketProcessor objects to reduce GC Default is 500 -1 is unlimited 0 is disabledprotected java.lang.IntegerrxBufSizeSocket receive buffer size in bytes (SO_RCVBUF).protected java.lang.BooleansoKeepAliveSO_KEEPALIVE option.protected java.lang.BooleansoLingerOnSO_LINGER option, paired with thesoLingerTimevalue.protected java.lang.IntegersoLingerTimeSO_LINGER option, paired with thesoLingerOnvalue.protected java.lang.BooleansoReuseAddressSO_REUSEADDR option.protected java.lang.IntegersoTimeoutSO_TIMEOUT option. default is 20000.protected java.lang.BooleantcpNoDelayTCP_NO_DELAY option.protected longtimeoutIntervalThe minimum frequency of the timeout interval to avoid excess load from the poller during high trafficprotected java.lang.IntegertxBufSizeSocket send buffer size in bytes (SO_SNDBUF).protected intunlockTimeoutTimeout in milliseconds for an unlock to take place.
 - 
Constructor SummaryConstructors Constructor Description SocketProperties()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAppReadBufSize()intgetAppWriteBufSize()intgetBufferPool()intgetBufferPoolSize()booleangetDirectBuffer()intgetDirectBufferPool()booleangetDirectSslBuffer()intgetEventCache()booleangetOoBInline()intgetPerformanceBandwidth()intgetPerformanceConnectionTime()intgetPerformanceLatency()intgetProcessorCache()intgetRxBufSize()booleangetSoKeepAlive()booleangetSoLingerOn()intgetSoLingerTime()booleangetSoReuseAddress()intgetSoTimeout()booleangetTcpNoDelay()longgetTimeoutInterval()intgetTxBufSize()intgetUnlockTimeout()voidsetAppReadBufSize(int appReadBufSize)voidsetAppWriteBufSize(int appWriteBufSize)voidsetBufferPool(int bufferPool)voidsetBufferPoolSize(int bufferPoolSize)voidsetDirectBuffer(boolean directBuffer)voidsetDirectBufferPool(int directBufferPool)voidsetDirectSslBuffer(boolean directSslBuffer)voidsetEventCache(int eventCache)voidsetOoBInline(boolean ooBInline)voidsetPerformanceBandwidth(int performanceBandwidth)voidsetPerformanceConnectionTime(int performanceConnectionTime)voidsetPerformanceLatency(int performanceLatency)voidsetProcessorCache(int processorCache)voidsetProperties(java.net.ServerSocket socket)voidsetProperties(java.net.Socket socket)voidsetProperties(java.nio.channels.AsynchronousServerSocketChannel socket)voidsetProperties(java.nio.channels.AsynchronousSocketChannel socket)voidsetRxBufSize(int rxBufSize)voidsetSoKeepAlive(boolean soKeepAlive)voidsetSoLingerOn(boolean soLingerOn)voidsetSoLingerTime(int soLingerTime)voidsetSoReuseAddress(boolean soReuseAddress)voidsetSoTimeout(int soTimeout)voidsetTcpNoDelay(boolean tcpNoDelay)voidsetTimeoutInterval(long timeoutInterval)voidsetTxBufSize(int txBufSize)voidsetUnlockTimeout(int unlockTimeout)
 
- 
- 
- 
Field Detail- 
processorCacheprotected 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
 - 
eventCacheprotected 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.
 - 
directBufferprotected boolean directBuffer Enable/disable direct buffers for the network buffers Default value is disabled
 - 
directSslBufferprotected boolean directSslBuffer Enable/disable direct buffers for the network buffers for SSL Default value is disabled
 - 
rxBufSizeprotected java.lang.Integer rxBufSize Socket receive buffer size in bytes (SO_RCVBUF). JVM default used if not set.
 - 
txBufSizeprotected java.lang.Integer txBufSize Socket send buffer size in bytes (SO_SNDBUF). JVM default used if not set.
 - 
appReadBufSizeprotected int appReadBufSize The application read buffer size in bytes. Default value is rxBufSize
 - 
appWriteBufSizeprotected int appWriteBufSize The application write buffer size in bytes Default value is txBufSize
 - 
bufferPoolprotected 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
 - 
bufferPoolSizeprotected 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)
 - 
tcpNoDelayprotected java.lang.Boolean tcpNoDelay TCP_NO_DELAY option. JVM default used if not set.
 - 
soKeepAliveprotected java.lang.Boolean soKeepAlive SO_KEEPALIVE option. JVM default used if not set.
 - 
ooBInlineprotected java.lang.Boolean ooBInline OOBINLINE option. JVM default used if not set.
 - 
soReuseAddressprotected java.lang.Boolean soReuseAddress SO_REUSEADDR option. JVM default used if not set.
 - 
soLingerOnprotected java.lang.Boolean soLingerOn SO_LINGER option, paired with thesoLingerTimevalue. JVM defaults used unless both attributes are set.
 - 
soLingerTimeprotected java.lang.Integer soLingerTime SO_LINGER option, paired with thesoLingerOnvalue. JVM defaults used unless both attributes are set.
 - 
soTimeoutprotected java.lang.Integer soTimeout SO_TIMEOUT option. default is 20000.
 - 
performanceConnectionTimeprotected 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.
 - 
performanceLatencyprotected 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.
 - 
performanceBandwidthprotected 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.
 - 
timeoutIntervalprotected long timeoutInterval The minimum frequency of the timeout interval to avoid excess load from the poller during high traffic
 - 
unlockTimeoutprotected int unlockTimeout Timeout in milliseconds for an unlock to take place.
 
- 
 - 
Method Detail- 
setPropertiespublic void setProperties(java.net.Socket socket) throws java.net.SocketException- Throws:
- java.net.SocketException
 
 - 
setPropertiespublic void setProperties(java.net.ServerSocket socket) throws java.net.SocketException- Throws:
- java.net.SocketException
 
 - 
setPropertiespublic void setProperties(java.nio.channels.AsynchronousSocketChannel socket) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
setPropertiespublic void setProperties(java.nio.channels.AsynchronousServerSocketChannel socket) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
getDirectBufferpublic boolean getDirectBuffer() 
 - 
getDirectSslBufferpublic boolean getDirectSslBuffer() 
 - 
getOoBInlinepublic boolean getOoBInline() 
 - 
getPerformanceBandwidthpublic int getPerformanceBandwidth() 
 - 
getPerformanceConnectionTimepublic int getPerformanceConnectionTime() 
 - 
getPerformanceLatencypublic int getPerformanceLatency() 
 - 
getRxBufSizepublic int getRxBufSize() 
 - 
getSoKeepAlivepublic boolean getSoKeepAlive() 
 - 
getSoLingerOnpublic boolean getSoLingerOn() 
 - 
getSoLingerTimepublic int getSoLingerTime() 
 - 
getSoReuseAddresspublic boolean getSoReuseAddress() 
 - 
getSoTimeoutpublic int getSoTimeout() 
 - 
getTcpNoDelaypublic boolean getTcpNoDelay() 
 - 
getTxBufSizepublic int getTxBufSize() 
 - 
getBufferPoolpublic int getBufferPool() 
 - 
getBufferPoolSizepublic int getBufferPoolSize() 
 - 
getEventCachepublic int getEventCache() 
 - 
getAppReadBufSizepublic int getAppReadBufSize() 
 - 
getAppWriteBufSizepublic int getAppWriteBufSize() 
 - 
getProcessorCachepublic int getProcessorCache() 
 - 
getTimeoutIntervalpublic long getTimeoutInterval() 
 - 
getDirectBufferPoolpublic int getDirectBufferPool() 
 - 
setPerformanceConnectionTimepublic void setPerformanceConnectionTime(int performanceConnectionTime) 
 - 
setTxBufSizepublic void setTxBufSize(int txBufSize) 
 - 
setTcpNoDelaypublic void setTcpNoDelay(boolean tcpNoDelay) 
 - 
setSoTimeoutpublic void setSoTimeout(int soTimeout) 
 - 
setSoReuseAddresspublic void setSoReuseAddress(boolean soReuseAddress) 
 - 
setSoLingerTimepublic void setSoLingerTime(int soLingerTime) 
 - 
setSoKeepAlivepublic void setSoKeepAlive(boolean soKeepAlive) 
 - 
setRxBufSizepublic void setRxBufSize(int rxBufSize) 
 - 
setPerformanceLatencypublic void setPerformanceLatency(int performanceLatency) 
 - 
setPerformanceBandwidthpublic void setPerformanceBandwidth(int performanceBandwidth) 
 - 
setOoBInlinepublic void setOoBInline(boolean ooBInline) 
 - 
setDirectBufferpublic void setDirectBuffer(boolean directBuffer) 
 - 
setDirectSslBufferpublic void setDirectSslBuffer(boolean directSslBuffer) 
 - 
setSoLingerOnpublic void setSoLingerOn(boolean soLingerOn) 
 - 
setBufferPoolpublic void setBufferPool(int bufferPool) 
 - 
setBufferPoolSizepublic void setBufferPoolSize(int bufferPoolSize) 
 - 
setEventCachepublic void setEventCache(int eventCache) 
 - 
setAppReadBufSizepublic void setAppReadBufSize(int appReadBufSize) 
 - 
setAppWriteBufSizepublic void setAppWriteBufSize(int appWriteBufSize) 
 - 
setProcessorCachepublic void setProcessorCache(int processorCache) 
 - 
setTimeoutIntervalpublic void setTimeoutInterval(long timeoutInterval) 
 - 
setDirectBufferPoolpublic void setDirectBufferPool(int directBufferPool) 
 - 
getUnlockTimeoutpublic int getUnlockTimeout() 
 - 
setUnlockTimeoutpublic void setUnlockTimeout(int unlockTimeout) 
 
- 
 
-