public class SocketOptions extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SocketOptions.Builder
Builder for
SocketOptions. |
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_CONNECT_TIMEOUT |
static Duration |
DEFAULT_CONNECT_TIMEOUT_DURATION |
static TimeUnit |
DEFAULT_CONNECT_TIMEOUT_UNIT |
static boolean |
DEFAULT_SO_KEEPALIVE |
static boolean |
DEFAULT_SO_NO_DELAY |
| Modifier | Constructor and Description |
|---|---|
protected |
SocketOptions(SocketOptions.Builder builder) |
protected |
SocketOptions(SocketOptions original) |
| Modifier and Type | Method and Description |
|---|---|
static SocketOptions.Builder |
builder()
Returns a new
SocketOptions.Builder to construct SocketOptions. |
static SocketOptions |
copyOf(SocketOptions options)
Create a copy of options
|
static SocketOptions |
create()
Create a new
SocketOptions using default settings. |
Duration |
getConnectTimeout()
Returns the connection timeout.
|
boolean |
isKeepAlive()
Returns whether to enable TCP keepalive.
|
boolean |
isTcpNoDelay()
Returns whether to use TCP NoDelay.
|
public static final long DEFAULT_CONNECT_TIMEOUT
public static final TimeUnit DEFAULT_CONNECT_TIMEOUT_UNIT
public static final Duration DEFAULT_CONNECT_TIMEOUT_DURATION
public static final boolean DEFAULT_SO_KEEPALIVE
public static final boolean DEFAULT_SO_NO_DELAY
protected SocketOptions(SocketOptions.Builder builder)
protected SocketOptions(SocketOptions original)
public static SocketOptions copyOf(SocketOptions options)
options - the originalSocketOptions containing the values of optionspublic static SocketOptions.Builder builder()
SocketOptions.Builder to construct SocketOptions.SocketOptions.Builder to construct SocketOptions.public static SocketOptions create()
SocketOptions using default settings.public Duration getConnectTimeout()
public boolean isKeepAlive()
SocketOptions.SO_KEEPALIVEpublic boolean isTcpNoDelay()
false to enable Nagle's algorithm.SocketOptions.TCP_NODELAYCopyright © 2019 lettuce.io. All rights reserved.