Package com.hazelcast.client.config
Class SocketOptions
java.lang.Object
com.hazelcast.client.config.SocketOptions
TCP Socket options
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intdefault buffer size of Bytesstatic final intconstant for kilobyte
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanintGets the SO_SNDBUF and SO_RCVBUF option valueintGets SO_LINGER with the specified linger time in secondsinthashCode()booleanSO_KEEPALIVE socket optionbooleanSO_REUSEADDR socket option.booleanTCP_NODELAY socket optionsetBufferSize(int bufferSize) Sets the SO_SNDBUF and SO_RCVBUF options to the specified value in KBsetKeepAlive(boolean keepAlive) Enable/disable SO_KEEPALIVE socket option.setLingerSeconds(int lingerSeconds) Enable/disable SO_LINGER with the specified linger time in seconds If set to a value of 0 or less then it is disabled.setReuseAddress(boolean reuseAddress) Enable/disable the SO_REUSEADDR socket option.setTcpNoDelay(boolean tcpNoDelay) Enable/disable TCP_NODELAY socket option.toString()
- 
Field Details- 
KILO_BYTEpublic static final int KILO_BYTEconstant for kilobyte- See Also:
 
- 
DEFAULT_BUFFER_SIZE_BYTEpublic static final int DEFAULT_BUFFER_SIZE_BYTEdefault buffer size of Bytes- See Also:
 
 
- 
- 
Constructor Details- 
SocketOptionspublic SocketOptions()
- 
SocketOptions
 
- 
- 
Method Details- 
isTcpNoDelaypublic boolean isTcpNoDelay()TCP_NODELAY socket option- Returns:
- true if enabled
 
- 
setTcpNoDelayEnable/disable TCP_NODELAY socket option.- Parameters:
- tcpNoDelay- the TCP_NODELAY socket option
- Returns:
- SocketOptions configured
 
- 
isKeepAlivepublic boolean isKeepAlive()SO_KEEPALIVE socket option- Returns:
- true if enabled
 
- 
setKeepAliveEnable/disable SO_KEEPALIVE socket option.- Parameters:
- keepAlive- enabled if true
- Returns:
- SocketOptions configured
 
- 
isReuseAddresspublic boolean isReuseAddress()SO_REUSEADDR socket option.- Returns:
- true if enabled
 
- 
setReuseAddressEnable/disable the SO_REUSEADDR socket option.- Parameters:
- reuseAddress- enabled if true
- Returns:
- SocketOptions configured
 
- 
getLingerSecondspublic int getLingerSeconds()Gets SO_LINGER with the specified linger time in seconds- Returns:
- lingerSeconds value in seconds
 
- 
setLingerSecondsEnable/disable SO_LINGER with the specified linger time in seconds If set to a value of 0 or less then it is disabled.Default value is DEFAULT_LINGER_SECONDS- Parameters:
- lingerSeconds- value in seconds
- Returns:
- SocketOptions configured
 
- 
getBufferSizepublic int getBufferSize()Gets the SO_SNDBUF and SO_RCVBUF option value- Returns:
- bufferSize KB value
 
- 
setBufferSizeSets the SO_SNDBUF and SO_RCVBUF options to the specified value in KB- Parameters:
- bufferSize- KB value
- Returns:
- SocketOptions configured
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-