Package com.hazelcast.config
Class EndpointConfig
java.lang.Object
com.hazelcast.config.EndpointConfig
- All Implemented Interfaces:
NamedConfig
- Direct Known Subclasses:
ServerSocketEndpointConfig
Endpoint configuration that defines communication/networking properties common to both incoming/outgoing connections
e.g.
- Encryption / Security
- Hazelcast protocol type
- Since:
- 3.12
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
Seejdk.net.ExtendedSocketOptions#TCP_KEEPINTERVAL
static final int
Seejdk.net.ExtendedSocketOptions#TCP_KEEPIDLE
static final int
Seejdk.net.ExtendedSocketOptions#TCP_KEEPINTERVAL
static final int
static final int
static final int
protected InterfacesConfig
protected String
protected com.hazelcast.instance.ProtocolType
protected SocketInterceptorConfig
protected SSLConfig
protected SymmetricEncryptionConfig
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddOutboundPort
(int port) addOutboundPortDefinition
(String portDef) boolean
getName()
com.hazelcast.instance.ProtocolType
com.hazelcast.instance.EndpointQualifier
int
Gets theSocketInterceptorConfig
.int
Keep-Alive count: the maximum number of TCP keep-alive probes to send before giving up and closing the connection if no response is obtained from the other side.int
Keep-Alive idle time: the number of seconds of idle time before keep-alive initiates a probe.int
Keep-Alive interval: the number of seconds between keep-alive probes.int
int
int
Returns the currentSSLConfig
.Deprecated.since 4.2Gets the TpcSocketConfig.int
hashCode()
boolean
boolean
boolean
setInterfaces
(InterfacesConfig interfaces) setOutboundPortDefinitions
(Collection<String> outboundPortDefs) setOutboundPorts
(Collection<Integer> outboundPorts) setProtocolType
(com.hazelcast.instance.ProtocolType protocolType) setSocketBufferDirect
(boolean socketBufferDirect) setSocketConnectTimeoutSeconds
(int socketConnectTimeoutSeconds) setSocketInterceptorConfig
(SocketInterceptorConfig socketInterceptorConfig) Sets theSocketInterceptorConfig
.setSocketKeepAlive
(boolean socketKeepAlive) setSocketKeepCount
(int socketKeepCount) Set the maximum number of TCP keep-alive probes to send before giving up and closing the connection if no response is obtained from the other side.setSocketKeepIdleSeconds
(int socketKeepIdleSeconds) Set the number of seconds a connection needs to be idle before TCP begins sending out keep-alive probes.setSocketKeepIntervalSeconds
(int socketKeepIntervalSeconds) Set the number of seconds between keep-alive probes.setSocketLingerSeconds
(int socketLingerSeconds) setSocketRcvBufferSizeKb
(int socketRcvBufferSizeKb) setSocketSendBufferSizeKb
(int socketSendBufferSizeKb) setSocketTcpNoDelay
(boolean socketTcpNoDelay) setSSLConfig
(SSLConfig sslConfig) Sets theSSLConfig
.setSymmetricEncryptionConfig
(SymmetricEncryptionConfig symmetricEncryptionConfig) Deprecated.since 4.2setTpcSocketConfig
(TpcSocketConfig tpcSocketConfig) Sets the TpcSocketConfig.
-
Field Details
-
DEFAULT_SOCKET_CONNECT_TIMEOUT_SECONDS
public static final int DEFAULT_SOCKET_CONNECT_TIMEOUT_SECONDS- See Also:
-
DEFAULT_SOCKET_SEND_BUFFER_SIZE_KB
public static final int DEFAULT_SOCKET_SEND_BUFFER_SIZE_KB- See Also:
-
DEFAULT_SOCKET_RECEIVE_BUFFER_SIZE_KB
public static final int DEFAULT_SOCKET_RECEIVE_BUFFER_SIZE_KB- See Also:
-
DEFAULT_SOCKET_LINGER_SECONDS
public static final int DEFAULT_SOCKET_LINGER_SECONDS- See Also:
-
DEFAULT_SOCKET_KEEP_IDLE_SECONDS
public static final int DEFAULT_SOCKET_KEEP_IDLE_SECONDSSeejdk.net.ExtendedSocketOptions#TCP_KEEPIDLE
- See Also:
-
DEFAULT_SOCKET_KEEP_INTERVAL_SECONDS
public static final int DEFAULT_SOCKET_KEEP_INTERVAL_SECONDSSeejdk.net.ExtendedSocketOptions#TCP_KEEPINTERVAL
- See Also:
-
DEFAULT_SOCKET_KEEP_COUNT
public static final int DEFAULT_SOCKET_KEEP_COUNTSeejdk.net.ExtendedSocketOptions#TCP_KEEPINTERVAL
- See Also:
-
name
-
protocolType
protected com.hazelcast.instance.ProtocolType protocolType -
interfaces
-
socketInterceptorConfig
-
sslConfig
-
symmetricEncryptionConfig
-
-
Constructor Details
-
EndpointConfig
public EndpointConfig()
-
-
Method Details
-
getProtocolType
public com.hazelcast.instance.ProtocolType getProtocolType() -
getName
- Specified by:
getName
in interfaceNamedConfig
-
setName
- Specified by:
setName
in interfaceNamedConfig
-
getSymmetricEncryptionConfig
Deprecated.since 4.2Gets theSymmetricEncryptionConfig
. The value can benull
which means that no symmetric encryption should be used.- Returns:
- the SymmetricEncryptionConfig
-
setSymmetricEncryptionConfig
@Deprecated public EndpointConfig setSymmetricEncryptionConfig(SymmetricEncryptionConfig symmetricEncryptionConfig) Deprecated.since 4.2Sets theSymmetricEncryptionConfig
. The value can benull
if no symmetric encryption should be used.- Parameters:
symmetricEncryptionConfig
- the SymmetricEncryptionConfig to set- Returns:
- the updated NetworkConfig
- See Also:
-
getQualifier
public com.hazelcast.instance.EndpointQualifier getQualifier() -
getOutboundPortDefinitions
-
setOutboundPortDefinitions
-
addOutboundPortDefinition
-
getOutboundPorts
-
setOutboundPorts
-
addOutboundPort
-
getInterfaces
- Returns:
- the interfaces
-
setInterfaces
- Parameters:
interfaces
- the interfaces to set
-
isSocketBufferDirect
public boolean isSocketBufferDirect() -
setSocketBufferDirect
-
isSocketTcpNoDelay
public boolean isSocketTcpNoDelay() -
isSocketKeepAlive
public boolean isSocketKeepAlive() -
setSocketKeepAlive
-
setSocketTcpNoDelay
-
getSocketSendBufferSizeKb
public int getSocketSendBufferSizeKb() -
setSocketSendBufferSizeKb
-
getSocketRcvBufferSizeKb
public int getSocketRcvBufferSizeKb() -
setSocketRcvBufferSizeKb
-
getSocketLingerSeconds
public int getSocketLingerSeconds() -
setSocketLingerSeconds
-
getSocketConnectTimeoutSeconds
public int getSocketConnectTimeoutSeconds() -
setSocketConnectTimeoutSeconds
-
getSocketInterceptorConfig
Gets theSocketInterceptorConfig
. The value can benull
if no socket interception is needed.- Returns:
- the SocketInterceptorConfig
- See Also:
-
setSocketInterceptorConfig
Sets theSocketInterceptorConfig
. The value can benull
if no socket interception is needed.- Parameters:
socketInterceptorConfig
- the SocketInterceptorConfig to set- Returns:
- the updated NetworkConfig
-
getSSLConfig
Returns the currentSSLConfig
. It is possible that null is returned if no SSLConfig has been set.- Returns:
- the SSLConfig
- See Also:
-
setSSLConfig
Sets theSSLConfig
. null value indicates that no SSLConfig should be used.- Parameters:
sslConfig
- the SSLConfig- Returns:
- the updated NetworkConfig
- See Also:
-
getTpcSocketConfig
Gets the TpcSocketConfig. Can't return null.- Returns:
- the TpcSocketConfig.
- Since:
- 5.3
- See Also:
-
setTpcSocketConfig
Sets the TpcSocketConfig. Can't return null.- Parameters:
tpcSocketConfig
- Tpc socket config to set- Returns:
- this endpoint config
- Throws:
NullPointerException
- if tpcSocketConfig is null- Since:
- 5.3
- See Also:
-
setProtocolType
-
getSocketKeepIdleSeconds
public int getSocketKeepIdleSeconds()Keep-Alive idle time: the number of seconds of idle time before keep-alive initiates a probe. This option is only applicable whenkeep alive is true
. Requires a recent JDK 8, JDK 11 or greater version that includes the required JDK support.- Returns:
- the configured value of Keep-Alive idle time.
- Since:
- 5.3.0
- See Also:
-
setSocketKeepIdleSeconds
Set the number of seconds a connection needs to be idle before TCP begins sending out keep-alive probes. Valid values are 1 to 32767. This option is only applicable whenkeep alive is true
. Requires a recent JDK 8, JDK 11 or greater version that includes the required JDK support.- Since:
- 5.3.0
- See Also:
-
getSocketKeepIntervalSeconds
public int getSocketKeepIntervalSeconds()Keep-Alive interval: the number of seconds between keep-alive probes. This option is only applicable whenkeep alive is true
. Requires a recent JDK 8, JDK 11 or greater version that includes the required JDK support.- Returns:
- the configured value of Keep-Alive interval time.
- Since:
- 5.3.0
- See Also:
-
setSocketKeepIntervalSeconds
Set the number of seconds between keep-alive probes. Notice that this is the number of seconds between probes after the initialkeep-alive idle time
has passed. Valid values are 1 to 32767. This option is only applicable whenkeep alive is true
. Requires a recent JDK 8, JDK 11 or greater version that includes the required JDK support.- Since:
- 5.3.0
- See Also:
-
getSocketKeepCount
public int getSocketKeepCount()Keep-Alive count: the maximum number of TCP keep-alive probes to send before giving up and closing the connection if no response is obtained from the other side. This option is only applicable whenkeep alive is true
. Requires a recent JDK 8, JDK 11 or greater version that includes the required JDK support.- Returns:
- the configured value of Keep-Alive probe count.
- Since:
- 5.3.0
- See Also:
-
setSocketKeepCount
Set the maximum number of TCP keep-alive probes to send before giving up and closing the connection if no response is obtained from the other side. Valid values are 1 to 127. This option is only applicable whenkeep alive is true
. Requires a recent JDK 8, JDK 11 or greater version that includes the required JDK support.- Since:
- 5.3.0
- See Also:
-
equals
-
hashCode
public int hashCode()
-