public class NetworkConfig extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT
Default value of port number.
|
Constructor and Description |
---|
NetworkConfig() |
public static final int DEFAULT_PORT
public int getPort()
setPort(int)
public NetworkConfig 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 void setPortCount(int portCount)
portCount
- the maximum number of ports allowed to usefor more information
public boolean isPortAutoIncrement()
setPortAutoIncrement(boolean)
public NetworkConfig 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 NetworkConfig 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
public Collection<String> getOutboundPortDefinitions()
public NetworkConfig setOutboundPortDefinitions(Collection<String> outboundPortDefs)
public NetworkConfig addOutboundPortDefinition(String portDef)
public Collection<Integer> getOutboundPorts()
public NetworkConfig setOutboundPorts(Collection<Integer> outboundPorts)
public NetworkConfig addOutboundPort(int port)
public InterfacesConfig getInterfaces()
public NetworkConfig setInterfaces(InterfacesConfig interfaces)
interfaces
- the interfaces to setpublic JoinConfig getJoin()
JoinConfig
.public NetworkConfig setJoin(JoinConfig join)
join
- the join to setpublic String getPublicAddress()
public NetworkConfig setPublicAddress(String publicAddress)
public SocketInterceptorConfig getSocketInterceptorConfig()
SocketInterceptorConfig
. The value can be null
if no socket interception is needed.setSocketInterceptorConfig(SocketInterceptorConfig)
public NetworkConfig setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)
SocketInterceptorConfig
. The value can be null
if no socket interception is needed.socketInterceptorConfig
- the SocketInterceptorConfig to setpublic SymmetricEncryptionConfig getSymmetricEncryptionConfig()
SymmetricEncryptionConfig
. The value can be null
which means that no symmetric encryption should
be used.public NetworkConfig setSymmetricEncryptionConfig(SymmetricEncryptionConfig symmetricEncryptionConfig)
SymmetricEncryptionConfig
. The value can be null
if no symmetric encryption should be used.symmetricEncryptionConfig
- the SymmetricEncryptionConfig to setgetSymmetricEncryptionConfig()
public SSLConfig getSSLConfig()
SSLConfig
. It is possible that null is returned if no SSLConfig has been set.SecurityException
- If a security manager exists and the calling method doesn't have corresponding
HazelcastRuntimePermission
setSSLConfig(SSLConfig)
public NetworkConfig setSSLConfig(SSLConfig sslConfig)
SSLConfig
. null value indicates that no SSLConfig should be used.sslConfig
- the SSLConfigSecurityException
- If a security manager exists and the calling method doesn't have corresponding
HazelcastRuntimePermission
getSSLConfig()
public MemberAddressProviderConfig getMemberAddressProviderConfig()
public NetworkConfig setMemberAddressProviderConfig(MemberAddressProviderConfig memberAddressProviderConfig)
public NetworkConfig setIcmpFailureDetectorConfig(IcmpFailureDetectorConfig icmpFailureDetectorConfig)
IcmpFailureDetectorConfig
. The value can be null
if this detector isn't needed.icmpFailureDetectorConfig
- the IcmpFailureDetectorConfig to setgetIcmpFailureDetectorConfig()
public IcmpFailureDetectorConfig getIcmpFailureDetectorConfig()
IcmpFailureDetectorConfig
. It is possible that null is returned if no
IcmpFailureDetectorConfig has been set.setIcmpFailureDetectorConfig(IcmpFailureDetectorConfig)
public RestApiConfig getRestApiConfig()
public NetworkConfig setRestApiConfig(RestApiConfig restApiConfig)
public MemcacheProtocolConfig getMemcacheProtocolConfig()
public NetworkConfig setMemcacheProtocolConfig(MemcacheProtocolConfig memcacheProtocolConfig)
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.