public class ServerSocketEndpointConfig extends EndpointConfig
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT
Default value of port number.
|
static int |
PORT_AUTO_INCREMENT
Default port auto-increment count.
|
DEFAULT_SOCKET_CONNECT_TIMEOUT_SECONDS, DEFAULT_SOCKET_LINGER_SECONDS, DEFAULT_SOCKET_RECEIVE_BUFFER_SIZE_KB, DEFAULT_SOCKET_SEND_BUFFER_SIZE_KB, interfaces, name, protocolType, socketInterceptorConfig, sslConfig, symmetricEncryptionConfig| Constructor and Description |
|---|
ServerSocketEndpointConfig() |
addOutboundPort, addOutboundPortDefinition, getInterfaces, getName, getOutboundPortDefinitions, getOutboundPorts, getProtocolType, getQualifier, getSocketConnectTimeoutSeconds, getSocketInterceptorConfig, getSocketLingerSeconds, getSocketRcvBufferSizeKb, getSocketSendBufferSizeKb, getSSLConfig, getSymmetricEncryptionConfig, isSocketBufferDirect, isSocketKeepAlive, isSocketTcpNoDelaypublic static final int DEFAULT_PORT
public static final int PORT_AUTO_INCREMENT
public String getPublicAddress()
public ServerSocketEndpointConfig setPublicAddress(String publicAddress)
public int getPort()
setPort(int)public ServerSocketEndpointConfig setPort(int port)
port - the port the Hazelcast member will try to bind ongetPort(),
for more informationpublic int getPortCount()
setPortCount(int),
for more informationpublic ServerSocketEndpointConfig setPortCount(int portCount)
portCount - the maximum number of ports allowed to usefor more informationpublic boolean isPortAutoIncrement()
setPortAutoIncrement(boolean)public ServerSocketEndpointConfig setPortAutoIncrement(boolean portAutoIncrement)
If you explicitly want to control the port a Hazelcast member is going to use, you probably want to set
portAutoincrement to false. In this case, the Hazelcast member is going to try the port setPort(int)
and if the port is not free, the member will not start and throw an exception.
If this value is set to true, Hazelcast will start at the port specified by setPort(int) and will try
until it finds a free port, or until it runs out of ports to try setPortCount(int).
portAutoIncrement - the portAutoIncrement to setisPortAutoIncrement(),
setPortCount(int),
setPort(int)public boolean isReuseAddress()
public ServerSocketEndpointConfig setReuseAddress(boolean reuseAddress)
When should setReuseAddress(true) be used?
When the member is shutdown, the server socket port will be in TIME_WAIT state for the next 2 minutes or so. If you start the member right after shutting it down, you may not be able to bind to the same port because it is in TIME_WAIT state. if you set reuseAddress=true then TIME_WAIT will be ignored and you will be able to bind to the same port again.
This property should not be set to true on the Windows platform: see
@PrivateApi public ServerSocketEndpointConfig setProtocolType(com.hazelcast.instance.ProtocolType protocolType)
setProtocolType in class EndpointConfigpublic ServerSocketEndpointConfig setName(String name)
setName in interface NamedConfigsetName in class EndpointConfigpublic ServerSocketEndpointConfig setOutboundPortDefinitions(Collection<String> outboundPortDefs)
setOutboundPortDefinitions in class EndpointConfigpublic ServerSocketEndpointConfig setOutboundPorts(Collection<Integer> outboundPorts)
setOutboundPorts in class EndpointConfigpublic ServerSocketEndpointConfig setInterfaces(InterfacesConfig interfaces)
setInterfaces in class EndpointConfiginterfaces - the interfaces to setpublic ServerSocketEndpointConfig setSocketBufferDirect(boolean socketBufferDirect)
setSocketBufferDirect in class EndpointConfigpublic ServerSocketEndpointConfig setSocketKeepAlive(boolean socketKeepAlive)
setSocketKeepAlive in class EndpointConfigpublic ServerSocketEndpointConfig setSocketTcpNoDelay(boolean socketTcpNoDelay)
setSocketTcpNoDelay in class EndpointConfigpublic ServerSocketEndpointConfig setSocketSendBufferSizeKb(int socketSendBufferSizeKb)
setSocketSendBufferSizeKb in class EndpointConfigpublic ServerSocketEndpointConfig setSocketRcvBufferSizeKb(int socketRcvBufferSizeKb)
setSocketRcvBufferSizeKb in class EndpointConfigpublic EndpointConfig setSocketLingerSeconds(int socketLingerSeconds)
setSocketLingerSeconds in class EndpointConfigpublic ServerSocketEndpointConfig setSocketConnectTimeoutSeconds(int socketConnectTimeoutSeconds)
setSocketConnectTimeoutSeconds in class EndpointConfigpublic ServerSocketEndpointConfig setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)
EndpointConfigSocketInterceptorConfig. The value can be null if no socket interception is needed.setSocketInterceptorConfig in class EndpointConfigsocketInterceptorConfig - the SocketInterceptorConfig to setpublic ServerSocketEndpointConfig setSSLConfig(SSLConfig sslConfig)
EndpointConfigSSLConfig. null value indicates that no SSLConfig should be used.setSSLConfig in class EndpointConfigsslConfig - the SSLConfigEndpointConfig.getSSLConfig()public ServerSocketEndpointConfig setSymmetricEncryptionConfig(SymmetricEncryptionConfig symmetricEncryptionConfig)
EndpointConfigSymmetricEncryptionConfig. The value can be null if no symmetric encryption should be used.setSymmetricEncryptionConfig in class EndpointConfigsymmetricEncryptionConfig - the SymmetricEncryptionConfig to setEndpointConfig.getSymmetricEncryptionConfig()Copyright © 2020 Hazelcast, Inc.. All rights reserved.