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, isSocketTcpNoDelay
public 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 information
public int getPortCount()
setPortCount(int)
,
for more information
public ServerSocketEndpointConfig setPortCount(int portCount)
portCount
- the maximum number of ports allowed to usefor more information
public 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 EndpointConfig
public ServerSocketEndpointConfig setName(String name)
setName
in interface NamedConfig
setName
in class EndpointConfig
public ServerSocketEndpointConfig setOutboundPortDefinitions(Collection<String> outboundPortDefs)
setOutboundPortDefinitions
in class EndpointConfig
public ServerSocketEndpointConfig setOutboundPorts(Collection<Integer> outboundPorts)
setOutboundPorts
in class EndpointConfig
public ServerSocketEndpointConfig setInterfaces(InterfacesConfig interfaces)
setInterfaces
in class EndpointConfig
interfaces
- the interfaces to setpublic ServerSocketEndpointConfig setSocketBufferDirect(boolean socketBufferDirect)
setSocketBufferDirect
in class EndpointConfig
public ServerSocketEndpointConfig setSocketKeepAlive(boolean socketKeepAlive)
setSocketKeepAlive
in class EndpointConfig
public ServerSocketEndpointConfig setSocketTcpNoDelay(boolean socketTcpNoDelay)
setSocketTcpNoDelay
in class EndpointConfig
public ServerSocketEndpointConfig setSocketSendBufferSizeKb(int socketSendBufferSizeKb)
setSocketSendBufferSizeKb
in class EndpointConfig
public ServerSocketEndpointConfig setSocketRcvBufferSizeKb(int socketRcvBufferSizeKb)
setSocketRcvBufferSizeKb
in class EndpointConfig
public EndpointConfig setSocketLingerSeconds(int socketLingerSeconds)
setSocketLingerSeconds
in class EndpointConfig
public ServerSocketEndpointConfig setSocketConnectTimeoutSeconds(int socketConnectTimeoutSeconds)
setSocketConnectTimeoutSeconds
in class EndpointConfig
public ServerSocketEndpointConfig setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)
EndpointConfig
SocketInterceptorConfig
. The value can be null
if no socket interception is needed.setSocketInterceptorConfig
in class EndpointConfig
socketInterceptorConfig
- the SocketInterceptorConfig to setpublic ServerSocketEndpointConfig setSSLConfig(SSLConfig sslConfig)
EndpointConfig
SSLConfig
. null value indicates that no SSLConfig should be used.setSSLConfig
in class EndpointConfig
sslConfig
- the SSLConfigEndpointConfig.getSSLConfig()
public ServerSocketEndpointConfig setSymmetricEncryptionConfig(SymmetricEncryptionConfig symmetricEncryptionConfig)
EndpointConfig
SymmetricEncryptionConfig
. The value can be null
if no symmetric encryption should be used.setSymmetricEncryptionConfig
in class EndpointConfig
symmetricEncryptionConfig
- the SymmetricEncryptionConfig to setEndpointConfig.getSymmetricEncryptionConfig()
public boolean equals(Object o)
equals
in class EndpointConfig
public int hashCode()
hashCode
in class EndpointConfig
Copyright © 2023 Hazelcast, Inc.. All rights reserved.