SO
- A CommonSocketOptions subclasspublic abstract class CommonSocketOptions<SO extends CommonSocketOptions<? super SO>> extends Object
Constructor and Description |
---|
CommonSocketOptions() |
Modifier and Type | Method and Description |
---|---|
boolean |
keepAlive()
Returns a boolean indicating whether or not
SO_KEEPALIVE is enabled |
SO |
keepAlive(boolean keepAlive)
Enables or disables
SO_KEEPALIVE . |
int |
linger()
Returns the configuration of
SO_LINGER . |
SO |
linger(int linger)
Configures
SO_LINGER |
long |
prefetch()
Gets the
prefetch maximum in-flight value |
SO |
prefetch(long prefetch)
Set the Consuming capacity along with eventual flushing strategy each given prefetch iteration.
|
int |
rcvbuf()
Gets the configured
SO_RCVBUF (receive buffer) size |
SO |
rcvbuf(int rcvbuf)
Sets the
SO_RCVBUF (receive buffer) size |
int |
sndbuf()
Gets the configured
SO_SNDBUF (send buffer) size |
SO |
sndbuf(int sndbuf)
Sets the
SO_SNDBUF (send buffer) size |
boolean |
tcpNoDelay()
Returns a boolean indicating whether or not
TCP_NODELAY is enabled |
SO |
tcpNoDelay(boolean tcpNoDelay)
Enables or disables
TCP_NODELAY |
int |
timeout()
Gets the
SO_TIMEOUT value |
SO |
timeout(int timeout)
Set the
SO_TIMEOUT value. |
public int timeout()
SO_TIMEOUT
valuepublic SO timeout(int timeout)
SO_TIMEOUT
value.timeout
- The SO_TIMEOUT
value.this
public long prefetch()
prefetch
maximum in-flight valueLong.MAX
if undefinedpublic SO prefetch(long prefetch)
prefetch
- The prefetch
in-flight data over this channel (Long.MAX_VALUE
for unbounded).this
public boolean keepAlive()
SO_KEEPALIVE
is enabledtrue
if keep alive is enabled, false
otherwisepublic SO keepAlive(boolean keepAlive)
SO_KEEPALIVE
.keepAlive
- true
to enable keepalive, false
to disable keepalivethis
public int linger()
SO_LINGER
.SO_LINGER
in secondspublic SO linger(int linger)
SO_LINGER
linger
- The linger period in secondsthis
public boolean tcpNoDelay()
TCP_NODELAY
is enabledtrue
if TCP_NODELAY
is enabled, false
if it is notpublic SO tcpNoDelay(boolean tcpNoDelay)
TCP_NODELAY
tcpNoDelay
- true
to enable TCP_NODELAY
, false
to disable itthis
public int rcvbuf()
SO_RCVBUF
(receive buffer) sizepublic SO rcvbuf(int rcvbuf)
SO_RCVBUF
(receive buffer) sizercvbuf
- The size of the receive bufferthis
public int sndbuf()
SO_SNDBUF
(send buffer) sizepublic SO sndbuf(int sndbuf)
SO_SNDBUF
(send buffer) sizesndbuf
- The size of the send bufferthis
Copyright © 2017. All rights reserved.