Package com.google.code.yanf4j.config
Class Configuration
- java.lang.Object
-
- com.google.code.yanf4j.config.Configuration
-
public class Configuration extends java.lang.ObjectNetworking configuration
-
-
Field Summary
Fields Modifier and Type Field Description private longcheckSessionTimeoutIntervalcheck session idle intervalstatic intDEFAULT_INCREASE_BUFF_SIZEIncreasing buffer size per timeprivate intdispatchMessageThreadCountThread coount for processing message dispatchingprivate booleanhandleReadWriteConcurrentlyWhether to handle read write concurrently,default is truestatic intMAX_READ_BUFFER_SIZEMax read buffer size for connectionprivate intreadThreadCountTHread count for processing READABLE eventprivate intselectorPoolSizeprivate longsessionIdleTimeoutprivate intsessionReadBufferSizeRead buffer size per connectionprivate intsoTimeoutSocket SO_TIMEOUT optionprotected longstatisticsIntervalprivate booleanstatisticsServerWhether to enable statisticsprivate intwriteThreadCountThread count for processing WRITABLE eventstatic java.lang.StringXMEMCACHED_SELECTOR_POOL_SIZE
-
Constructor Summary
Constructors Constructor Description Configuration()
-
Method Summary
-
-
-
Field Detail
-
XMEMCACHED_SELECTOR_POOL_SIZE
public static final java.lang.String XMEMCACHED_SELECTOR_POOL_SIZE
- See Also:
- Constant Field Values
-
sessionReadBufferSize
private int sessionReadBufferSize
Read buffer size per connection
-
soTimeout
private int soTimeout
Socket SO_TIMEOUT option
-
writeThreadCount
private int writeThreadCount
Thread count for processing WRITABLE event
-
statisticsServer
private boolean statisticsServer
Whether to enable statistics
-
handleReadWriteConcurrently
private boolean handleReadWriteConcurrently
Whether to handle read write concurrently,default is true
-
dispatchMessageThreadCount
private int dispatchMessageThreadCount
Thread coount for processing message dispatching
-
readThreadCount
private int readThreadCount
THread count for processing READABLE event
-
selectorPoolSize
private int selectorPoolSize
-
DEFAULT_INCREASE_BUFF_SIZE
public static final int DEFAULT_INCREASE_BUFF_SIZE
Increasing buffer size per time- See Also:
- Constant Field Values
-
MAX_READ_BUFFER_SIZE
public static final int MAX_READ_BUFFER_SIZE
Max read buffer size for connection- See Also:
- Constant Field Values
-
checkSessionTimeoutInterval
private long checkSessionTimeoutInterval
check session idle interval
-
sessionIdleTimeout
private long sessionIdleTimeout
-
statisticsInterval
protected long statisticsInterval
-
-
Method Detail
-
getWriteThreadCount
public final int getWriteThreadCount()
-
getDispatchMessageThreadCount
public final int getDispatchMessageThreadCount()
-
setDispatchMessageThreadCount
public final void setDispatchMessageThreadCount(int dispatchMessageThreadCount)
-
setWriteThreadCount
public final void setWriteThreadCount(int writeThreadCount)
-
getSessionIdleTimeout
public final long getSessionIdleTimeout()
- Returns:
- See Also:
setSessionIdleTimeout(long)
-
setSessionIdleTimeout
public final void setSessionIdleTimeout(long sessionIdleTimeout)
-
getSessionReadBufferSize
public final int getSessionReadBufferSize()
- Returns:
- See Also:
setSessionReadBufferSize(int)
-
isHandleReadWriteConcurrently
public final boolean isHandleReadWriteConcurrently()
-
getSoTimeout
public final int getSoTimeout()
-
getStatisticsInterval
public final long getStatisticsInterval()
-
setStatisticsInterval
public final void setStatisticsInterval(long statisticsInterval)
-
setSoTimeout
public final void setSoTimeout(int soTimeout)
-
setHandleReadWriteConcurrently
public final void setHandleReadWriteConcurrently(boolean handleReadWriteConcurrently)
-
setSessionReadBufferSize
public final void setSessionReadBufferSize(int tcpHandlerReadBufferSize)
-
isStatisticsServer
public final boolean isStatisticsServer()
-
setStatisticsServer
public final void setStatisticsServer(boolean statisticsServer)
-
getReadThreadCount
public final int getReadThreadCount()
- Returns:
- See Also:
setReadThreadCount(int)
-
setReadThreadCount
public final void setReadThreadCount(int readThreadCount)
-
setCheckSessionTimeoutInterval
public void setCheckSessionTimeoutInterval(long checkSessionTimeoutInterval)
-
getCheckSessionTimeoutInterval
public long getCheckSessionTimeoutInterval()
-
setSelectorPoolSize
public void setSelectorPoolSize(int selectorPoolSize)
-
getSelectorPoolSize
public int getSelectorPoolSize()
-
-