Class EndpointConfig

java.lang.Object
com.hazelcast.config.EndpointConfig
All Implemented Interfaces:
NamedConfig
Direct Known Subclasses:
ServerSocketEndpointConfig

public class EndpointConfig extends Object implements NamedConfig
Endpoint configuration that defines communication/networking properties common to both incoming/outgoing connections eg. - Encryption / Security - Hazelcast protocol type
Since:
3.12
  • Field Details

  • Constructor Details

    • EndpointConfig

      public EndpointConfig()
  • Method Details

    • getProtocolType

      public com.hazelcast.instance.ProtocolType getProtocolType()
    • getName

      public String getName()
      Specified by:
      getName in interface NamedConfig
    • setName

      public EndpointConfig setName(String name)
      Specified by:
      setName in interface NamedConfig
    • getSymmetricEncryptionConfig

      @Deprecated public SymmetricEncryptionConfig getSymmetricEncryptionConfig()
      Deprecated.
      since 4.2
      Gets the SymmetricEncryptionConfig. The value can be null which means that no symmetric encryption should be used.
      Returns:
      the SymmetricEncryptionConfig
    • setSymmetricEncryptionConfig

      @Deprecated public EndpointConfig setSymmetricEncryptionConfig(SymmetricEncryptionConfig symmetricEncryptionConfig)
      Deprecated.
      since 4.2
      Sets the SymmetricEncryptionConfig. The value can be null 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

      public Collection<String> getOutboundPortDefinitions()
    • setOutboundPortDefinitions

      public EndpointConfig setOutboundPortDefinitions(Collection<String> outboundPortDefs)
    • addOutboundPortDefinition

      public EndpointConfig addOutboundPortDefinition(String portDef)
    • getOutboundPorts

      public Collection<Integer> getOutboundPorts()
    • setOutboundPorts

      public EndpointConfig setOutboundPorts(Collection<Integer> outboundPorts)
    • addOutboundPort

      public EndpointConfig addOutboundPort(int port)
    • getInterfaces

      public InterfacesConfig getInterfaces()
      Returns:
      the interfaces
    • setInterfaces

      public EndpointConfig setInterfaces(InterfacesConfig interfaces)
      Parameters:
      interfaces - the interfaces to set
    • isSocketBufferDirect

      public boolean isSocketBufferDirect()
    • setSocketBufferDirect

      public EndpointConfig setSocketBufferDirect(boolean socketBufferDirect)
    • isSocketTcpNoDelay

      public boolean isSocketTcpNoDelay()
    • isSocketKeepAlive

      public boolean isSocketKeepAlive()
    • setSocketKeepAlive

      public EndpointConfig setSocketKeepAlive(boolean socketKeepAlive)
    • setSocketTcpNoDelay

      public EndpointConfig setSocketTcpNoDelay(boolean socketTcpNoDelay)
    • getSocketSendBufferSizeKb

      public int getSocketSendBufferSizeKb()
    • setSocketSendBufferSizeKb

      public EndpointConfig setSocketSendBufferSizeKb(int socketSendBufferSizeKb)
    • getSocketRcvBufferSizeKb

      public int getSocketRcvBufferSizeKb()
    • setSocketRcvBufferSizeKb

      public EndpointConfig setSocketRcvBufferSizeKb(int socketRcvBufferSizeKb)
    • getSocketLingerSeconds

      public int getSocketLingerSeconds()
    • setSocketLingerSeconds

      public EndpointConfig setSocketLingerSeconds(int socketLingerSeconds)
    • getSocketConnectTimeoutSeconds

      public int getSocketConnectTimeoutSeconds()
    • setSocketConnectTimeoutSeconds

      public EndpointConfig setSocketConnectTimeoutSeconds(int socketConnectTimeoutSeconds)
    • getSocketInterceptorConfig

      public SocketInterceptorConfig getSocketInterceptorConfig()
      Gets the SocketInterceptorConfig. The value can be null if no socket interception is needed.
      Returns:
      the SocketInterceptorConfig
      See Also:
    • setSocketInterceptorConfig

      public EndpointConfig setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)
      Sets the SocketInterceptorConfig. The value can be null if no socket interception is needed.
      Parameters:
      socketInterceptorConfig - the SocketInterceptorConfig to set
      Returns:
      the updated NetworkConfig
    • getSSLConfig

      public SSLConfig getSSLConfig()
      Returns the current SSLConfig. It is possible that null is returned if no SSLConfig has been set.
      Returns:
      the SSLConfig
      See Also:
    • setSSLConfig

      public EndpointConfig setSSLConfig(SSLConfig sslConfig)
      Sets the SSLConfig. null value indicates that no SSLConfig should be used.
      Parameters:
      sslConfig - the SSLConfig
      Returns:
      the updated NetworkConfig
      See Also:
    • getTpcSocketConfig

      @Beta @Nonnull public TpcSocketConfig getTpcSocketConfig()
      Gets the TpcSocketConfig. Can't return null.
      Returns:
      the TpcSocketConfig.
      Since:
      5.3
      See Also:
    • setTpcSocketConfig

      @Beta @Nonnull public EndpointConfig setTpcSocketConfig(@Nonnull TpcSocketConfig tpcSocketConfig)
      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

      @PrivateApi public EndpointConfig setProtocolType(com.hazelcast.instance.ProtocolType protocolType)
    • 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 when keep 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

      public EndpointConfig setSocketKeepIdleSeconds(int socketKeepIdleSeconds)
      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 when keep 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 when keep 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

      public EndpointConfig setSocketKeepIntervalSeconds(int socketKeepIntervalSeconds)
      Set the number of seconds between keep-alive probes. Notice that this is the number of seconds between probes after the initial keep-alive idle time has passed. Valid values are 1 to 32767.

      This option is only applicable when keep 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 when keep 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

      public EndpointConfig 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. Valid values are 1 to 127.

      This option is only applicable when keep 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object