public class NetworkConfig extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT
Default value of port number
|
Constructor and Description |
---|
NetworkConfig() |
Modifier and Type | Method and Description |
---|---|
NetworkConfig |
addOutboundPort(int port) |
NetworkConfig |
addOutboundPortDefinition(String portDef) |
InterfacesConfig |
getInterfaces() |
JoinConfig |
getJoin()
Returns the
JoinConfig . |
Collection<String> |
getOutboundPortDefinitions() |
Collection<Integer> |
getOutboundPorts() |
int |
getPort()
Returns the port the Hazelcast member will try to bind on.
|
int |
getPortCount()
Returns the maximum number of ports allowed to try to bind on.
|
String |
getPublicAddress() |
SocketInterceptorConfig |
getSocketInterceptorConfig()
Gets the
SocketInterceptorConfig . |
SSLConfig |
getSSLConfig()
Returns the current
SSLConfig . |
SymmetricEncryptionConfig |
getSymmetricEncryptionConfig()
Gets the
SymmetricEncryptionConfig . |
boolean |
isPortAutoIncrement()
Checks if a Hazelcast member is allowed find a free port by incrementing the port number when it encounters
an occupied port.
|
boolean |
isReuseAddress() |
NetworkConfig |
setInterfaces(InterfacesConfig interfaces) |
NetworkConfig |
setJoin(JoinConfig join) |
NetworkConfig |
setOutboundPortDefinitions(Collection<String> outboundPortDefs) |
NetworkConfig |
setOutboundPorts(Collection<Integer> outboundPorts) |
NetworkConfig |
setPort(int port)
Sets the port the Hazelcast member will try to bind on.
|
NetworkConfig |
setPortAutoIncrement(boolean portAutoIncrement)
Sets if a Hazelcast member is allowed to find a free port by incrementing the port number when it encounters
an occupied port.
|
void |
setPortCount(int portCount)
The maximum number of ports allowed to use.
|
NetworkConfig |
setPublicAddress(String publicAddress)
Overrides the public address of a member.
|
NetworkConfig |
setReuseAddress(boolean reuseAddress)
Sets the reuse address.
|
NetworkConfig |
setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)
Sets the
SocketInterceptorConfig . |
NetworkConfig |
setSSLConfig(SSLConfig sslConfig)
Sets the
SSLConfig . |
NetworkConfig |
setSymmetricEncryptionConfig(SymmetricEncryptionConfig symmetricEncryptionConfig)
Sets the
SymmetricEncryptionConfig . |
String |
toString() |
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 use.for more information.
public boolean isPortAutoIncrement()
setPortAutoIncrement(boolean)
public NetworkConfig setPortAutoIncrement(boolean portAutoIncrement)
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)
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.setSSLConfig(SSLConfig)
public NetworkConfig setSSLConfig(SSLConfig sslConfig)
SSLConfig
. null value indicates that no SSLConfig should be used.sslConfig
- the SSLConfig.getSSLConfig()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.