Package com.hazelcast.config.tpc
Class TpcSocketConfig
- java.lang.Object
-
- com.hazelcast.config.tpc.TpcSocketConfig
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_RECEIVE_BUFFER_SIZE_KB
static int
DEFAULT_SEND_BUFFER_SIZE_KB
-
Constructor Summary
Constructors Constructor Description TpcSocketConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getPortRange()
Gets the possible port range for TPC sockets to bind.int
getReceiveBufferSizeKB()
Gets the receive-buffer size of the TPC sockets in kilobytes.int
getSendBufferSizeKB()
Gets the send-buffer size of the TPC sockets in kilobytes.int
hashCode()
TpcSocketConfig
setPortRange(java.lang.String portRange)
Sets the possible port range for TPC sockets to bind.TpcSocketConfig
setReceiveBufferSizeKB(int receiveBufferSizeKB)
Sets the receive-buffer size of the TPC sockets in kilobytes.TpcSocketConfig
setSendBufferSizeKB(int sendBufferSizeKB)
Sets the send-buffer size of the TPC sockets in kilobytes.java.lang.String
toString()
-
-
-
Field Detail
-
DEFAULT_RECEIVE_BUFFER_SIZE_KB
public static final int DEFAULT_RECEIVE_BUFFER_SIZE_KB
- See Also:
SocketOptions.SO_RCVBUF
, Constant Field Values
-
DEFAULT_SEND_BUFFER_SIZE_KB
public static final int DEFAULT_SEND_BUFFER_SIZE_KB
- See Also:
SocketOptions.SO_SNDBUF
, Constant Field Values
-
-
Method Detail
-
getPortRange
@Nonnull public java.lang.String getPortRange()
Gets the possible port range for TPC sockets to bind. Can't return null.- Returns:
- the port range string
-
setPortRange
@Nonnull public TpcSocketConfig setPortRange(@Nonnull java.lang.String portRange)
Sets the possible port range for TPC sockets to bind. Can't return null.- Parameters:
portRange
- the port range to set- Returns:
- this TPC socket config
- Throws:
java.lang.IllegalArgumentException
- if portRange doesn't match\d{1,5}-\d{1,5}
regular expressionjava.lang.NullPointerException
- if portRange is null
-
getReceiveBufferSizeKB
public int getReceiveBufferSizeKB()
Gets the receive-buffer size of the TPC sockets in kilobytes.- Returns:
- the receive-buffer size of the TPC sockets in kilobytes
- See Also:
SocketOptions.SO_RCVBUF
-
setReceiveBufferSizeKB
@Nonnull public TpcSocketConfig setReceiveBufferSizeKB(int receiveBufferSizeKB)
Sets the receive-buffer size of the TPC sockets in kilobytes. Can't return null.- Parameters:
receiveBufferSizeKB
- the receive-buffer size of the TPC sockets in kilobytes- Returns:
- this TPC socket config
- Throws:
java.lang.IllegalArgumentException
- if receiveBufferSizeKB isn't positive- See Also:
SocketOptions.SO_RCVBUF
-
getSendBufferSizeKB
public int getSendBufferSizeKB()
Gets the send-buffer size of the TPC sockets in kilobytes.- Returns:
- the send-buffer size of the TPC sockets in kilobytes
- See Also:
SocketOptions.SO_SNDBUF
-
setSendBufferSizeKB
@Nonnull public TpcSocketConfig setSendBufferSizeKB(int sendBufferSizeKB)
Sets the send-buffer size of the TPC sockets in kilobytes. Can't return null.- Parameters:
sendBufferSizeKB
- the send-buffer size of the TPC sockets in kilobytes- Returns:
- this TPC socket config
- Throws:
java.lang.IllegalArgumentException
- if sendBufferSizeKB isn't positive- See Also:
SocketOptions.SO_SNDBUF
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-