com.hazelcast.config
Class NetworkConfig
java.lang.Object
com.hazelcast.config.NetworkConfig
public class NetworkConfig
- extends Object
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
NetworkConfig
public NetworkConfig()
getPort
public int getPort()
- Returns the port the Hazelcast member is going to try to bind on.
- Returns:
- the port the port to bind on.
- See Also:
setPort(int)
setPort
public NetworkConfig setPort(int port)
- Sets the port the Hazelcast member is going to try to bind on.
- Parameters:
port - the port to bind on.
- Returns:
- NetworkConfig the updated NetworkConfig
- See Also:
getPort(),
for more information.
getPortCount
public int getPortCount()
- Returns the maximum number of ports allowed to try to bind on.
- Returns:
- the maximum number of ports allowed to try.
- See Also:
setPortCount(int),
for more information.
setPortCount
public void setPortCount(int portCount)
- The maxmim number of ports to try.
- Parameters:
portCount - the maximum number of ports allowed to use.- See Also:
for more information.
isPortAutoIncrement
public boolean isPortAutoIncrement()
- Checks if a Hazelcast member is allowed find a free port by incrementing the port number when it encounters
an occupied port.
- Returns:
- the portAutoIncrement
- See Also:
setPortAutoIncrement(boolean)
setPortAutoIncrement
public 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.
If you explicitly want to control the port the 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 to 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).
- Parameters:
portAutoIncrement - the portAutoIncrement to set
- Returns:
- the updated NetworkConfig
- See Also:
isPortAutoIncrement(),
setPortCount(int),
setPort(int)
isReuseAddress
public boolean isReuseAddress()
setReuseAddress
public NetworkConfig setReuseAddress(boolean reuseAddress)
getOutboundPortDefinitions
public Collection<String> getOutboundPortDefinitions()
setOutboundPortDefinitions
public NetworkConfig setOutboundPortDefinitions(Collection<String> outboundPortDefs)
addOutboundPortDefinition
public NetworkConfig addOutboundPortDefinition(String portDef)
getOutboundPorts
public Collection<Integer> getOutboundPorts()
setOutboundPorts
public NetworkConfig setOutboundPorts(Collection<Integer> outboundPorts)
addOutboundPort
public NetworkConfig addOutboundPort(int port)
getInterfaces
public InterfacesConfig getInterfaces()
- Returns:
- the interfaces
setInterfaces
public NetworkConfig setInterfaces(InterfacesConfig interfaces)
- Parameters:
interfaces - the interfaces to set
getJoin
public JoinConfig getJoin()
- Returns the
JoinConfig.
- Returns:
- the join
setJoin
public NetworkConfig setJoin(JoinConfig join)
- Parameters:
join - the join to set
getPublicAddress
public String getPublicAddress()
setPublicAddress
public NetworkConfig setPublicAddress(String publicAddress)
getSocketInterceptorConfig
public SocketInterceptorConfig getSocketInterceptorConfig()
- Gets the
SocketInterceptorConfig. The value can be null if no socket interception is needed.
- Returns:
- the SocketInterceptorConfig
- See Also:
setSocketInterceptorConfig(SocketInterceptorConfig)
setSocketInterceptorConfig
public NetworkConfig setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)
- Sets the
SocketInterceptorConfig. The value can be null if no socket interception is needed.
- Parameters:
socketInterceptorConfig - the SocketInterceptorConfig
- Returns:
- the updated NetworkConfig
getSymmetricEncryptionConfig
public SymmetricEncryptionConfig getSymmetricEncryptionConfig()
- Gets the
SymmetricEncryptionConfig. The value can be null which means that no symmetric encryption should
be used.
- Returns:
- the SymmetricEncryptionConfig
- See Also:
setSymmetricEncryptionConfig
public NetworkConfig setSymmetricEncryptionConfig(SymmetricEncryptionConfig symmetricEncryptionConfig)
- Sets the
SymmetricEncryptionConfig. The value can be null if no symmetric encryption should be used.
- Parameters:
symmetricEncryptionConfig - the SymmetricEncryptionConfig
- Returns:
- the updated NetworkConfig.
- See Also:
getSymmetricEncryptionConfig()
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(SSLConfig)
setSSLConfig
public NetworkConfig 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:
getSSLConfig()
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.