Global configuration
- net.sf.cindy.config (default: config.properties)
Cindy config file - net.sf.cindy.enableJmx (default: false)
Enable jmx support - net.sf.cindy.disableInnerException (default: false)
Disable inner exception dispatch
Buffer configuration
- net.sf.cindy.bufferCache (default: net.sf.cindy.buffer.DefaultBufferCache)
BufferCache class name - net.sf.cindy.useDirectBuffer (default: false)
Use direct buffer instead of heap buffer - net.sf.cindy.useLinkedBuffer (default: false)
Use linked buffer instead of memory copy
Dispatcher configuration
- net.sf.cindy.dispatcher (default: net.sf.cindy.session.dispatcher.DefaultDispatcher)
Dispatcher class name - net.sf.cindy.dispatcher.keepAliveTime (default: 3000)
Dispatcher keep alive time - net.sf.cindy.dispatcher.capacity (default: 1000)
Dispatcher capacity (flow control)
Session configuration
- net.sf.cindy.session.timeout (default: 0)
Session timeout (like SO_TIMEOUT) - net.sf.cindy.session.recvBufferSize (default: -1)
SO_RCVBUF - net.sf.cindy.session.sendBufferSize (default: -1)
SO_SNDBUF - net.sf.cindy.session.reuseAddress (default: false)
SO_REUSEADDR - net.sf.cindy.session.tcpNoDelay (default: true)
TCP_NODELAY - net.sf.cindy.session.soLinger (default: -1)
SO_LINGER - net.sf.cindy.session.readPacketSize (default: 8192)
Session read packet size - net.sf.cindy.session.nio.reactor (default: net.sf.cindy.session.nio.reactor.DefaultReactor)
NIO Reactor class name
Acceptor configuration
- net.sf.cindy.acceptor.backlog (default: 100)
Acceptor backlog - net.sf.cindy.acceptor.reuseAddress (default: false)
SO_REUSEADDR
For example, to enable jmx, use direct buffer, set dispatcher keep alive time to 10s and enable acceptor reuse address, you can specify configuration in system environment :
-Dnet.sf.cindy.enableJmx=true
-Dnet.sf.cindy.useDirectBuffer=true
-Dnet.sf.cindy.dispatcher.keepAliveTime=10000
-Dnet.sf.cindy.acceptor.reuseAddress=true
or you can put cindy.properties on your classpath:
enableJmx=true
useDirectBuffer=true
dispatcher.keepAliveTime=10000
acceptor.reuseAddress=true