public class NetworkConfig
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HOST_NAME |
java.lang.String |
hostName
Hostname of server.
|
static java.lang.String |
NETWORK_CLIENT_ENABLE_CONNECTION_REPLENISHMENT |
static java.lang.String |
NETWORK_CLIENT_MAX_REPLENISHMENT_PER_HOST_PER_SECOND |
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.
|
int |
networkClientMaxReplenishmentPerHostPerSecond
The max number of new connections to a remote host that should be created per second when replenishing connections.
|
static java.lang.String |
NUM_IO_THREADS |
int |
numIoThreads
The number of io threads that the server uses for carrying out network requests
|
int |
port
The port to listen and accept connections on
|
static java.lang.String |
PORT |
static java.lang.String |
QUEUED_MAX_REQUESTS |
int |
queuedMaxRequests
The number of queued requests allowed before blocking the network threads
|
static java.lang.String |
SELECTOR_EXECUTOR_POOL_SIZE |
static java.lang.String |
SELECTOR_MAX_KEY_TO_PROCESS |
static java.lang.String |
SELECTOR_USE_DIRECT_BUFFERS |
int |
selectorExecutorPoolSize
The size of the pool if selector executor pool is employed.
|
int |
selectorMaxKeyToProcess
The max number of ready keys can be processed in a selector.poll() call.
|
boolean |
selectorUseDirectBuffers
True to allocate direct buffers within the selector (for things like SSL work).
|
static java.lang.String |
SOCKET_RECEIVE_BUFFER_BYTES |
static java.lang.String |
SOCKET_REQUEST_MAX_BYTES |
static java.lang.String |
SOCKET_SEND_BUFFER_BYTES |
int |
socketReceiveBufferBytes
The SO_RCVBUFF buffer of the socket sever sockets
|
int |
socketRequestMaxBytes
The maximum number of bytes in a socket request
|
int |
socketSendBufferBytes
The SO_SNDBUFF buffer of the socket sever sockets
|
Constructor and Description |
---|
NetworkConfig(VerifiableProperties verifiableProperties) |
public static final java.lang.String NUM_IO_THREADS
public static final java.lang.String QUEUED_MAX_REQUESTS
public static final java.lang.String PORT
public static final java.lang.String HOST_NAME
public static final java.lang.String SOCKET_SEND_BUFFER_BYTES
public static final java.lang.String SOCKET_RECEIVE_BUFFER_BYTES
public static final java.lang.String SOCKET_REQUEST_MAX_BYTES
public static final java.lang.String NETWORK_CLIENT_ENABLE_CONNECTION_REPLENISHMENT
public static final java.lang.String NETWORK_CLIENT_MAX_REPLENISHMENT_PER_HOST_PER_SECOND
public static final java.lang.String SELECTOR_EXECUTOR_POOL_SIZE
public static final java.lang.String SELECTOR_MAX_KEY_TO_PROCESS
public static final java.lang.String SELECTOR_USE_DIRECT_BUFFERS
@Config(value="num.io.threads") @Default(value="8") public final int numIoThreads
@Config(value="queued.max.requests") @Default(value="500") public final int queuedMaxRequests
@Config(value="port") @Default(value="6667") public final int port
@Config(value="host.name") @Default(value="localhost") public final java.lang.String hostName
@Config(value="socket.send.buffer.bytes") @Default(value="1048576") public final int socketSendBufferBytes
@Config(value="socket.receive.buffer.bytes") @Default(value="1048576") public final int socketReceiveBufferBytes
@Config(value="socket.request.max.bytes") @Default(value="104857600") public final int socketRequestMaxBytes
@Config(value="network.client.enable.connection.replenishment") @Default(value="false") public final boolean networkClientEnableConnectionReplenishment
@Config(value="network.client.max.replenishment.per.host.per.second") @Default(value="1") public final int networkClientMaxReplenishmentPerHostPerSecond
@Config(value="selector.executor.pool.size") @Default(value="4") public final int selectorExecutorPoolSize
@Config(value="selector.max.key.to.process") @Default(value="-1") public final int selectorMaxKeyToProcess
public NetworkConfig(VerifiableProperties verifiableProperties)