Package io.atomix.cluster
Class NodeBuilder
java.lang.Object
io.atomix.cluster.NodeBuilder
- All Implemented Interfaces:
io.atomix.utils.Builder<Node>
- Direct Known Subclasses:
MemberBuilder
public class NodeBuilder extends Object implements io.atomix.utils.Builder<Node>
Node builder.
-
Method Summary
Modifier and Type Method Description Nodebuild()NodeBuilderwithAddress(int port)Deprecated.since 3.1.NodeBuilderwithAddress(io.atomix.utils.net.Address address)Sets the node address.NodeBuilderwithAddress(String address)Deprecated.since 3.1.NodeBuilderwithAddress(String host, int port)Deprecated.since 3.1.NodeBuilderwithHost(String host)Sets the node host.NodeBuilderwithId(NodeId id)Sets the node identifier.NodeBuilderwithId(String id)Sets the node identifier.NodeBuilderwithPort(int port)Sets the node port.
-
Method Details
-
withId
Sets the node identifier.- Parameters:
id- the node identifier- Returns:
- the node builder
-
withId
Sets the node identifier.- Parameters:
id- the node identifier- Returns:
- the node builder
-
withHost
Sets the node host.- Parameters:
host- the node host- Returns:
- the node builder
-
withPort
Sets the node port.- Parameters:
port- the node port- Returns:
- the node builder
-
withAddress
Deprecated.since 3.1. UsewithHost(String)and/orwithPort(int)insteadSets the node address.- Parameters:
address- a host:port tuple- Returns:
- the node builder
- Throws:
io.atomix.utils.net.MalformedAddressException- if a validAddresscannot be constructed from the arguments
-
withAddress
Deprecated.since 3.1. UsewithHost(String)andwithPort(int)insteadSets the node host/port.- Parameters:
host- the host nameport- the port number- Returns:
- the node builder
- Throws:
io.atomix.utils.net.MalformedAddressException- if a validAddresscannot be constructed from the arguments
-
withAddress
Deprecated.since 3.1. UsewithPort(int)insteadSets the node address using local host.- Parameters:
port- the port number- Returns:
- the node builder
- Throws:
io.atomix.utils.net.MalformedAddressException- if a validAddresscannot be constructed from the arguments
-
withAddress
Sets the node address.- Parameters:
address- the node address- Returns:
- the node builder
-
build
- Specified by:
buildin interfaceio.atomix.utils.Builder<Node>
-