Class IOReactorConfig

  • All Implemented Interfaces:
    java.lang.Cloneable

    public final class IOReactorConfig
    extends java.lang.Object
    implements java.lang.Cloneable
    I/O reactor configuration parameters.
    Since:
    4.2
    • Field Detail

      • selectInterval

        private long selectInterval
      • shutdownGracePeriod

        private long shutdownGracePeriod
      • interestOpQueued

        private boolean interestOpQueued
      • ioThreadCount

        private int ioThreadCount
      • soTimeout

        private int soTimeout
      • soReuseAddress

        private boolean soReuseAddress
      • soLinger

        private int soLinger
      • soKeepAlive

        private boolean soKeepAlive
      • tcpNoDelay

        private boolean tcpNoDelay
      • connectTimeout

        private int connectTimeout
      • sndBufSize

        private int sndBufSize
      • rcvBufSize

        private int rcvBufSize
      • backlogSize

        private final int backlogSize
    • Constructor Detail

      • IOReactorConfig

        IOReactorConfig​(long selectInterval,
                        long shutdownGracePeriod,
                        boolean interestOpQueued,
                        int ioThreadCount,
                        int soTimeout,
                        boolean soReuseAddress,
                        int soLinger,
                        boolean soKeepAlive,
                        boolean tcpNoDelay,
                        int connectTimeout,
                        int sndBufSize,
                        int rcvBufSize,
                        int backlogSize)
    • Method Detail

      • getSelectInterval

        public long getSelectInterval()
        Determines time interval in milliseconds at which the I/O reactor wakes up to check for timed out sessions and session requests.

        Default: 1000 milliseconds.

      • getShutdownGracePeriod

        public long getShutdownGracePeriod()
        Determines grace period in milliseconds the I/O reactors are expected to block waiting for individual worker threads to terminate cleanly.

        Default: 500 milliseconds.

      • isInterestOpQueued

        public boolean isInterestOpQueued()
        Determines whether or not I/O interest operations are to be queued and executed asynchronously by the I/O reactor thread or to be applied to the underlying SelectionKey immediately.

        Default: false

        See Also:
        SelectionKey, SelectionKey.interestOps(), SelectionKey.interestOps(int)
      • getIoThreadCount

        public int getIoThreadCount()
        Determines the number of I/O dispatch threads to be used by the I/O reactor.

        Default: 2

      • getSoTimeout

        public int getSoTimeout()
        Determines the default socket timeout value for non-blocking I/O operations.

        Default: 0 (no timeout)

        See Also:
        SocketOptions.SO_TIMEOUT
      • isSoReuseAddress

        public boolean isSoReuseAddress()
        Determines the default value of the SocketOptions.SO_REUSEADDR parameter for newly created sockets.

        Default: false

        See Also:
        SocketOptions.SO_REUSEADDR
      • getSoLinger

        public int getSoLinger()
        Determines the default value of the SocketOptions.SO_LINGER parameter for newly created sockets.

        Default: -1

        See Also:
        SocketOptions.SO_LINGER
      • isSoKeepalive

        public boolean isSoKeepalive()
        Determines the default value of the SocketOptions.SO_KEEPALIVE parameter for newly created sockets.

        Default: -1

        See Also:
        SocketOptions.SO_KEEPALIVE
      • isTcpNoDelay

        public boolean isTcpNoDelay()
        Determines the default value of the SocketOptions.TCP_NODELAY parameter for newly created sockets.

        Default: false

        See Also:
        SocketOptions.TCP_NODELAY
      • getConnectTimeout

        public int getConnectTimeout()
        Determines the default connect timeout value for non-blocking connection requests.

        Default: 0 (no timeout)

      • getSndBufSize

        public int getSndBufSize()
        Determines the default value of the SocketOptions.SO_SNDBUF parameter for newly created sockets.

        Default: 0 (system default)

        See Also:
        SocketOptions.SO_SNDBUF
      • getRcvBufSize

        public int getRcvBufSize()
        Determines the default value of the SocketOptions.SO_RCVBUF parameter for newly created sockets.

        Default: 0 (system default)

        See Also:
        SocketOptions.SO_RCVBUF
      • getBacklogSize

        public int getBacklogSize()
        Determines the default backlog size value for server sockets binds.

        Default: 0 (system default)

        Since:
        4.4
      • clone

        protected IOReactorConfig clone()
                                 throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object