Package com.google.code.yanf4j.config
Class Configuration
java.lang.Object
com.google.code.yanf4j.config.Configuration
Networking configuration
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longcheck session idle intervalstatic final intIncreasing buffer size per timeprivate intThread coount for processing message dispatchingprivate booleanWhether to handle read write concurrently,default is truestatic final intMax read buffer size for connectionprivate intTHread count for processing READABLE eventprivate intprivate longprivate intRead buffer size per connectionprivate intSocket SO_TIMEOUT optionprotected longprivate booleanWhether to enable statisticsprivate intThread count for processing WRITABLE eventstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongfinal intfinal intintfinal longfinal intfinal intfinal longfinal intfinal booleanfinal booleanvoidsetCheckSessionTimeoutInterval(long checkSessionTimeoutInterval) final voidsetDispatchMessageThreadCount(int dispatchMessageThreadCount) final voidsetHandleReadWriteConcurrently(boolean handleReadWriteConcurrently) final voidsetReadThreadCount(int readThreadCount) voidsetSelectorPoolSize(int selectorPoolSize) final voidsetSessionIdleTimeout(long sessionIdleTimeout) final voidsetSessionReadBufferSize(int tcpHandlerReadBufferSize) final voidsetSoTimeout(int soTimeout) final voidsetStatisticsInterval(long statisticsInterval) final voidsetStatisticsServer(boolean statisticsServer) final voidsetWriteThreadCount(int writeThreadCount)
-
Field Details
-
XMEMCACHED_SELECTOR_POOL_SIZE
- See Also:
-
sessionReadBufferSize
private int sessionReadBufferSizeRead buffer size per connection -
soTimeout
private int soTimeoutSocket SO_TIMEOUT option -
writeThreadCount
private int writeThreadCountThread count for processing WRITABLE event -
statisticsServer
private boolean statisticsServerWhether to enable statistics -
handleReadWriteConcurrently
private boolean handleReadWriteConcurrentlyWhether to handle read write concurrently,default is true -
dispatchMessageThreadCount
private int dispatchMessageThreadCountThread coount for processing message dispatching -
readThreadCount
private int readThreadCountTHread count for processing READABLE event -
selectorPoolSize
private int selectorPoolSize -
DEFAULT_INCREASE_BUFF_SIZE
public static final int DEFAULT_INCREASE_BUFF_SIZEIncreasing buffer size per time- See Also:
-
MAX_READ_BUFFER_SIZE
public static final int MAX_READ_BUFFER_SIZEMax read buffer size for connection- See Also:
-
checkSessionTimeoutInterval
private long checkSessionTimeoutIntervalcheck session idle interval -
sessionIdleTimeout
private long sessionIdleTimeout -
statisticsInterval
protected long statisticsInterval
-
-
Constructor Details
-
Configuration
public Configuration()
-
-
Method Details
-
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
public final void setSessionIdleTimeout(long sessionIdleTimeout) -
getSessionReadBufferSize
public final int getSessionReadBufferSize()- Returns:
- See Also:
-
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
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()
-