org.apache.tomcat.util.net

Class SocketProperties

public class SocketProperties extends Object

Properties 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

Author: Filip Hanik

Field Summary
protected intappReadBufSize
The application read buffer size in bytes.
protected intappWriteBufSize
The application write buffer size in bytes Default value is txBufSize
protected intbufferPool
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 intbufferPoolSize
Buffer pool size in bytes to be cached -1 means unlimited, 0 means no cache Default value is 100MB (1024*1024*100 bytes)
protected booleandirectBuffer
Enable/disable direct buffers for the network buffers Default value is enabled
protected inteventCache
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 intkeyCache
Enable/disable key cache, this bounded cache stores KeyAttachment objects to reduce GC Default is 500 -1 is unlimited 0 is disabled
protected booleanooBInline
OOBINLINE option, default is true
protected intperformanceBandwidth
Performance preferences according to http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) Default value is 1
protected intperformanceConnectionTime
Performance preferences according to http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) Default value is 1
protected intperformanceLatency
Performance preferences according to http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) Default value is 0
protected intprocessorCache
Enable/disable socket processor cache, this bounded cache stores SocketProcessor objects to reduce GC Default is 500 -1 is unlimited 0 is disabled
protected intrxBufSize
Socket receive buffer size in bytes (SO_RCVBUF) Default value is 25188
protected booleansoKeepAlive
SO_KEEPALIVE option, default is false
protected booleansoLingerOn
SO_LINGER option, default is true, paired with the soLingerTime value
protected intsoLingerTime
SO_LINGER option, default is 25 seconds.
protected booleansoReuseAddress
SO_REUSEADDR option, default is true
protected intsoTimeout
SO_TIMEOUT option, default is 5000 milliseconds
protected intsoTrafficClass
Traffic class option, value between 0 and 255 IPTOS_LOWCOST (0x02) IPTOS_RELIABILITY (0x04) IPTOS_THROUGHPUT (0x08) IPTOS_LOWDELAY (0x10) Default value is 0x04 | 0x08 | 0x010
protected booleantcpNoDelay
TCP_NO_DELAY option, default is true
protected longtimeoutInterval
The minimum frequency of the timeout interval to avoid the poller going boinkers during high traffic
protected inttxBufSize
Socket send buffer size in bytes (SO_SNDBUF) Default value is 43800
protected intunlockTimeout
Timeout in milliseconds for an unlock to take place.
Method Summary
intgetAppReadBufSize()
intgetAppWriteBufSize()
intgetBufferPool()
intgetBufferPoolSize()
booleangetDirectBuffer()
intgetDirectBufferPool()
intgetEventCache()
intgetKeyCache()
booleangetOoBInline()
intgetPerformanceBandwidth()
intgetPerformanceConnectionTime()
intgetPerformanceLatency()
intgetProcessorCache()
SocketgetProperties()
intgetRxBufSize()
booleangetSoKeepAlive()
booleangetSoLingerOn()
intgetSoLingerTime()
booleangetSoReuseAddress()
intgetSoTimeout()
intgetSoTrafficClass()
booleangetTcpNoDelay()
longgetTimeoutInterval()
intgetTxBufSize()
intgetUnlockTimeout()
voidsetAppReadBufSize(int appReadBufSize)
voidsetAppWriteBufSize(int appWriteBufSize)
voidsetBufferPool(int bufferPool)
voidsetBufferPoolSize(int bufferPoolSize)
voidsetDirectBuffer(boolean directBuffer)
voidsetDirectBufferPool(int directBufferPool)
voidsetEventCache(int eventCache)
voidsetKeyCache(int keyCache)
voidsetOoBInline(boolean ooBInline)
voidsetPerformanceBandwidth(int performanceBandwidth)
voidsetPerformanceConnectionTime(int performanceConnectionTime)
voidsetPerformanceLatency(int performanceLatency)
voidsetProcessorCache(int processorCache)
voidsetProperties(Socket socket)
voidsetRxBufSize(int rxBufSize)
voidsetSoKeepAlive(boolean soKeepAlive)
voidsetSoLingerOn(boolean soLingerOn)
voidsetSoLingerTime(int soLingerTime)
voidsetSoReuseAddress(boolean soReuseAddress)
voidsetSoTimeout(int soTimeout)
voidsetSoTrafficClass(int soTrafficClass)
voidsetTcpNoDelay(boolean tcpNoDelay)
voidsetTimeoutInterval(long timeoutInterval)
voidsetTxBufSize(int txBufSize)
voidsetUnlockTimeout(int unlockTimeout)

Field Detail

appReadBufSize

protected int appReadBufSize
The application read buffer size in bytes. Default value is rxBufSize

appWriteBufSize

protected int appWriteBufSize
The application write buffer size in bytes Default value is txBufSize

bufferPool

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

bufferPoolSize

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)

directBuffer

protected boolean directBuffer
Enable/disable direct buffers for the network buffers Default value is enabled

eventCache

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.

keyCache

protected int keyCache
Enable/disable key cache, this bounded cache stores KeyAttachment objects to reduce GC Default is 500 -1 is unlimited 0 is disabled

ooBInline

protected boolean ooBInline
OOBINLINE option, default is true

performanceBandwidth

protected int performanceBandwidth
Performance preferences according to http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) Default value is 1

performanceConnectionTime

protected int performanceConnectionTime
Performance preferences according to http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) Default value is 1

performanceLatency

protected int performanceLatency
Performance preferences according to http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) Default value is 0

processorCache

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

rxBufSize

protected int rxBufSize
Socket receive buffer size in bytes (SO_RCVBUF) Default value is 25188

soKeepAlive

protected boolean soKeepAlive
SO_KEEPALIVE option, default is false

soLingerOn

protected boolean soLingerOn
SO_LINGER option, default is true, paired with the soLingerTime value

soLingerTime

protected int soLingerTime
SO_LINGER option, default is 25 seconds.

soReuseAddress

protected boolean soReuseAddress
SO_REUSEADDR option, default is true

soTimeout

protected int soTimeout
SO_TIMEOUT option, default is 5000 milliseconds

soTrafficClass

protected int soTrafficClass
Traffic class option, value between 0 and 255 IPTOS_LOWCOST (0x02) IPTOS_RELIABILITY (0x04) IPTOS_THROUGHPUT (0x08) IPTOS_LOWDELAY (0x10) Default value is 0x04 | 0x08 | 0x010

tcpNoDelay

protected boolean tcpNoDelay
TCP_NO_DELAY option, default is true

timeoutInterval

protected long timeoutInterval
The minimum frequency of the timeout interval to avoid the poller going boinkers during high traffic

txBufSize

protected int txBufSize
Socket send buffer size in bytes (SO_SNDBUF) Default value is 43800

unlockTimeout

protected int unlockTimeout
Timeout in milliseconds for an unlock to take place.

Method Detail

getAppReadBufSize

public int getAppReadBufSize()

getAppWriteBufSize

public int getAppWriteBufSize()

getBufferPool

public int getBufferPool()

getBufferPoolSize

public int getBufferPoolSize()

getDirectBuffer

public boolean getDirectBuffer()

getDirectBufferPool

public int getDirectBufferPool()

getEventCache

public int getEventCache()

getKeyCache

public int getKeyCache()

getOoBInline

public boolean getOoBInline()

getPerformanceBandwidth

public int getPerformanceBandwidth()

getPerformanceConnectionTime

public int getPerformanceConnectionTime()

getPerformanceLatency

public int getPerformanceLatency()

getProcessorCache

public int getProcessorCache()

getProperties

public Socket getProperties()

getRxBufSize

public int getRxBufSize()

getSoKeepAlive

public boolean getSoKeepAlive()

getSoLingerOn

public boolean getSoLingerOn()

getSoLingerTime

public int getSoLingerTime()

getSoReuseAddress

public boolean getSoReuseAddress()

getSoTimeout

public int getSoTimeout()

getSoTrafficClass

public int getSoTrafficClass()

getTcpNoDelay

public boolean getTcpNoDelay()

getTimeoutInterval

public long getTimeoutInterval()

getTxBufSize

public int getTxBufSize()

getUnlockTimeout

public int getUnlockTimeout()

setAppReadBufSize

public void setAppReadBufSize(int appReadBufSize)

setAppWriteBufSize

public void setAppWriteBufSize(int appWriteBufSize)

setBufferPool

public void setBufferPool(int bufferPool)

setBufferPoolSize

public void setBufferPoolSize(int bufferPoolSize)

setDirectBuffer

public void setDirectBuffer(boolean directBuffer)

setDirectBufferPool

public void setDirectBufferPool(int directBufferPool)

setEventCache

public void setEventCache(int eventCache)

setKeyCache

public void setKeyCache(int keyCache)

setOoBInline

public void setOoBInline(boolean ooBInline)

setPerformanceBandwidth

public void setPerformanceBandwidth(int performanceBandwidth)

setPerformanceConnectionTime

public void setPerformanceConnectionTime(int performanceConnectionTime)

setPerformanceLatency

public void setPerformanceLatency(int performanceLatency)

setProcessorCache

public void setProcessorCache(int processorCache)

setProperties

public void setProperties(Socket socket)

setRxBufSize

public void setRxBufSize(int rxBufSize)

setSoKeepAlive

public void setSoKeepAlive(boolean soKeepAlive)

setSoLingerOn

public void setSoLingerOn(boolean soLingerOn)

setSoLingerTime

public void setSoLingerTime(int soLingerTime)

setSoReuseAddress

public void setSoReuseAddress(boolean soReuseAddress)

setSoTimeout

public void setSoTimeout(int soTimeout)

setSoTrafficClass

public void setSoTrafficClass(int soTrafficClass)

setTcpNoDelay

public void setTcpNoDelay(boolean tcpNoDelay)

setTimeoutInterval

public void setTimeoutInterval(long timeoutInterval)

setTxBufSize

public void setTxBufSize(int txBufSize)

setUnlockTimeout

public void setUnlockTimeout(int unlockTimeout)
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.