public class TcpIpConfig extends Object
Constructor and Description |
---|
TcpIpConfig() |
Modifier and Type | Method and Description |
---|---|
TcpIpConfig |
addMember(String member)
Adds a 'well known' member.
|
TcpIpConfig |
clear()
Removes all members.
|
int |
getConnectionTimeoutSeconds()
Returns the connection timeout.
|
List<String> |
getMembers()
Gets a list of all the well known members.
|
String |
getRequiredMember()
Gets the required member.
|
boolean |
isEnabled()
Checks if the Tcp/Ip join mechanism is enabled.
|
TcpIpConfig |
setConnectionTimeoutSeconds(int connectionTimeoutSeconds)
Sets the connection timeout.
|
TcpIpConfig |
setEnabled(boolean enabled)
Enables or disables the Tcp/Ip join mechanism.
|
TcpIpConfig |
setMembers(List<String> members)
Sets the well known members.
|
TcpIpConfig |
setRequiredMember(String requiredMember)
Sets the required member.
|
String |
toString() |
public int getConnectionTimeoutSeconds()
setConnectionTimeoutSeconds(int)
public TcpIpConfig setConnectionTimeoutSeconds(int connectionTimeoutSeconds)
connectionTimeoutSeconds
- the connection timeout in seconds.IllegalArgumentException
- if connectionTimeoutSeconds is smaller than 0.getConnectionTimeoutSeconds()
public boolean isEnabled()
public TcpIpConfig setEnabled(boolean enabled)
enabled
- true to enable the Tcp/Ip join mechanism, false to disablepublic List<String> getMembers()
setMembers(java.util.List)
public TcpIpConfig setMembers(List<String> members)
clear()
.
A member can be a comma separated string, e..g '10.11.12.1,10.11.12.2' which indicates multiple members
are going to be added.members
- the members to setIllegalArgumentException
- if members is null.public TcpIpConfig addMember(String member)
member
- the member to add.IllegalArgumentException
- if member is null or empty.getMembers()
public TcpIpConfig clear()
addMember(String)
public String getRequiredMember()
setRequiredMember(String)
public TcpIpConfig setRequiredMember(String requiredMember)
requiredMember
- the requiredMember to setgetRequiredMember()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.