Class NetworkConfig


  • public class NetworkConfig
    extends java.lang.Object
    The configs for network layer
    • Field Detail

      • QUEUED_MAX_REQUESTS

        public static final java.lang.String QUEUED_MAX_REQUESTS
        See Also:
        Constant Field Values
      • SOCKET_SEND_BUFFER_BYTES

        public static final java.lang.String SOCKET_SEND_BUFFER_BYTES
        See Also:
        Constant Field Values
      • SOCKET_RECEIVE_BUFFER_BYTES

        public static final java.lang.String SOCKET_RECEIVE_BUFFER_BYTES
        See Also:
        Constant Field Values
      • SOCKET_REQUEST_MAX_BYTES

        public static final java.lang.String SOCKET_REQUEST_MAX_BYTES
        See Also:
        Constant Field Values
      • NETWORK_CLIENT_ENABLE_CONNECTION_REPLENISHMENT

        public static final java.lang.String NETWORK_CLIENT_ENABLE_CONNECTION_REPLENISHMENT
        See Also:
        Constant Field Values
      • NETWORK_CLIENT_MAX_REPLENISHMENT_PER_HOST_PER_SECOND

        public static final java.lang.String NETWORK_CLIENT_MAX_REPLENISHMENT_PER_HOST_PER_SECOND
        See Also:
        Constant Field Values
      • SELECTOR_EXECUTOR_POOL_SIZE

        public static final java.lang.String SELECTOR_EXECUTOR_POOL_SIZE
        See Also:
        Constant Field Values
      • SELECTOR_MAX_KEY_TO_PROCESS

        public static final java.lang.String SELECTOR_MAX_KEY_TO_PROCESS
        See Also:
        Constant Field Values
      • SELECTOR_USE_DIRECT_BUFFERS

        public static final java.lang.String SELECTOR_USE_DIRECT_BUFFERS
        See Also:
        Constant Field Values
      • numIoThreads

        @Config("num.io.threads")
        @Default("8")
        public final int numIoThreads
        The number of io threads that the server uses for carrying out network requests
      • queuedMaxRequests

        @Config("queued.max.requests")
        @Default("500")
        public final int queuedMaxRequests
        The number of queued requests allowed before blocking the network threads
      • port

        @Config("port")
        @Default("6667")
        public final int port
        The port to listen and accept connections on
      • hostName

        @Config("host.name")
        @Default("localhost")
        public final java.lang.String hostName
        Hostname of server. If this is set, it will only bind to this address. If this is not set, it will bind to all interfaces, and publish one to ZK
      • socketSendBufferBytes

        @Config("socket.send.buffer.bytes")
        @Default("1048576")
        public final int socketSendBufferBytes
        The SO_SNDBUFF buffer of the socket sever sockets
      • socketReceiveBufferBytes

        @Config("socket.receive.buffer.bytes")
        @Default("1048576")
        public final int socketReceiveBufferBytes
        The SO_RCVBUFF buffer of the socket sever sockets
      • socketRequestMaxBytes

        @Config("socket.request.max.bytes")
        @Default("104857600")
        public final int socketRequestMaxBytes
        The maximum number of bytes in a socket request
      • networkClientEnableConnectionReplenishment

        @Config("network.client.enable.connection.replenishment")
        @Default("false")
        public final boolean networkClientEnableConnectionReplenishment
        Whether the client should attempt to replenish connections when the number of connections to a host drops below a minimum number of active connections.
      • networkClientMaxReplenishmentPerHostPerSecond

        @Config("network.client.max.replenishment.per.host.per.second")
        @Default("1")
        public final int networkClientMaxReplenishmentPerHostPerSecond
        The max number of new connections to a remote host that should be created per second when replenishing connections.
      • selectorExecutorPoolSize

        @Config("selector.executor.pool.size")
        @Default("4")
        public final int selectorExecutorPoolSize
        The size of the pool if selector executor pool is employed. When size is 0, executor pool won't be used.
      • selectorMaxKeyToProcess

        @Config("selector.max.key.to.process")
        @Default("-1")
        public final int selectorMaxKeyToProcess
        The max number of ready keys can be processed in a selector.poll() call. No limitation if -1 is used.
      • selectorUseDirectBuffers

        @Config("selector.use.direct.buffers")
        @Default("false")
        public final boolean selectorUseDirectBuffers
        True to allocate direct buffers within the selector (for things like SSL work).