public class SocketOptions extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BUFFER_SIZE_BYTE
default buffer size of Bytes
|
static int |
KILO_BYTE
constant for kilobyte
|
Constructor and Description |
---|
SocketOptions() |
Modifier and Type | Method and Description |
---|---|
int |
getBufferSize()
Gets the SO_SNDBUF and SO_RCVBUF options to the specified value in KB
|
int |
getLingerSeconds()
Gets SO_LINGER with the specified linger time in seconds
|
boolean |
isKeepAlive()
SO_KEEPALIVE socket option
|
boolean |
isReuseAddress()
SO_REUSEADDR socket option.
|
boolean |
isTcpNoDelay()
TCP_NODELAY socket option
|
SocketOptions |
setBufferSize(int bufferSize)
Sets the SO_SNDBUF and SO_RCVBUF options to the specified value in KB
|
SocketOptions |
setKeepAlive(boolean keepAlive)
Enable/disable SO_KEEPALIVE socket option.
|
SocketOptions |
setLingerSeconds(int lingerSeconds)
Enable/disable SO_LINGER with the specified linger time in seconds
|
SocketOptions |
setReuseAddress(boolean reuseAddress)
Enable/disable the SO_REUSEADDR socket option.
|
SocketOptions |
setTcpNoDelay(boolean tcpNoDelay)
Enable/disable TCP_NODELAY socket option.
|
public static final int KILO_BYTE
public static final int DEFAULT_BUFFER_SIZE_BYTE
public boolean isTcpNoDelay()
public SocketOptions setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay
- public boolean isKeepAlive()
public SocketOptions setKeepAlive(boolean keepAlive)
keepAlive
- enabled if truepublic boolean isReuseAddress()
public SocketOptions setReuseAddress(boolean reuseAddress)
reuseAddress
- enabled if truepublic int getLingerSeconds()
public SocketOptions setLingerSeconds(int lingerSeconds)
lingerSeconds
- value in secondspublic int getBufferSize()
public SocketOptions setBufferSize(int bufferSize)
bufferSize
- KB valueCopyright © 2018 Hazelcast, Inc.. All rights reserved.