Package io.atomix.cluster
Class MemberBuilder
java.lang.Object
io.atomix.cluster.NodeBuilder
io.atomix.cluster.MemberBuilder
- All Implemented Interfaces:
io.atomix.utils.Builder<Node>
public class MemberBuilder extends NodeBuilder
Member builder.
-
Method Summary
Modifier and Type Method Description Memberbuild()MemberBuilderwithAddress(int port)Deprecated.since 3.1.MemberBuilderwithAddress(io.atomix.utils.net.Address address)Sets the member address.MemberBuilderwithAddress(String address)Deprecated.since 3.1.MemberBuilderwithAddress(String host, int port)Deprecated.since 3.1.MemberBuilderwithHost(String host)Sets the node host.MemberBuilderwithHostId(String hostId)Sets the host to which the member belongs.MemberBuilderwithId(MemberId id)Sets the member identifier.MemberBuilderwithId(NodeId id)Sets the node identifier.MemberBuilderwithId(String id)Sets the node identifier.MemberBuilderwithPort(int port)Sets the node port.MemberBuilderwithProperties(Properties properties)Sets the member properties.MemberBuilderwithProperty(String key, String value)Sets a member property.MemberBuilderwithRack(String rack)Deprecated.since 3.1.MemberBuilderwithRackId(String rack)Sets the rack to which the member belongs.MemberBuilderwithZone(String zone)Deprecated.since 3.1.MemberBuilderwithZoneId(String zoneId)Sets the zone to which the member belongs.
-
Method Details
-
withId
Description copied from class:NodeBuilderSets the node identifier.- Overrides:
withIdin classNodeBuilder- Parameters:
id- the node identifier- Returns:
- the node builder
-
withId
Description copied from class:NodeBuilderSets the node identifier.- Overrides:
withIdin classNodeBuilder- Parameters:
id- the node identifier- Returns:
- the node builder
-
withId
Sets the member identifier.- Parameters:
id- the member identifier- Returns:
- the member builder
-
withHost
Description copied from class:NodeBuilderSets the node host.- Overrides:
withHostin classNodeBuilder- Parameters:
host- the node host- Returns:
- the node builder
-
withPort
Description copied from class:NodeBuilderSets the node port.- Overrides:
withPortin classNodeBuilder- Parameters:
port- the node port- Returns:
- the node builder
-
withAddress
Deprecated.since 3.1. UsewithHost(String)and/orwithPort(int)insteadSets the member address.- Overrides:
withAddressin classNodeBuilder- Parameters:
address- a host:port tuple- Returns:
- the member 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 member host/port.- Overrides:
withAddressin classNodeBuilder- Parameters:
host- the host nameport- the port number- Returns:
- the member builder
- Throws:
io.atomix.utils.net.MalformedAddressException- if a validAddresscannot be constructed from the arguments
-
withAddress
Deprecated.since 3.1. UsewithPort(int)insteadSets the member address using local host.- Overrides:
withAddressin classNodeBuilder- Parameters:
port- the port number- Returns:
- the member builder
- Throws:
io.atomix.utils.net.MalformedAddressException- if a validAddresscannot be constructed from the arguments
-
withAddress
Sets the member address.- Overrides:
withAddressin classNodeBuilder- Parameters:
address- the member address- Returns:
- the member builder
-
withZoneId
Sets the zone to which the member belongs.- Parameters:
zoneId- the zone to which the member belongs- Returns:
- the member builder
-
withZone
Deprecated.since 3.1. UsewithZoneId(String)insteadSets the zone to which the member belongs.- Parameters:
zone- the zone to which the member belongs- Returns:
- the member builder
-
withRackId
Sets the rack to which the member belongs.- Parameters:
rack- the rack to which the member belongs- Returns:
- the member builder
-
withRack
Deprecated.since 3.1. UsewithRackId(String)insteadSets the rack to which the member belongs.- Parameters:
rack- the rack to which the member belongs- Returns:
- the member builder
-
withHostId
Sets the host to which the member belongs.- Parameters:
hostId- the host to which the member belongs- Returns:
- the member builder
-
withProperties
Sets the member properties.- Parameters:
properties- the member properties- Returns:
- the member builder
- Throws:
NullPointerException- if the properties are null
-
withProperty
Sets a member property.- Parameters:
key- the property key to setvalue- the property value to set- Returns:
- the member builder
- Throws:
NullPointerException- if the property is null
-
build
- Specified by:
buildin interfaceio.atomix.utils.Builder<Node>- Overrides:
buildin classNodeBuilder
-