public class NodeBuilder extends Object implements io.atomix.utils.Builder<Node>
| Modifier and Type | Method and Description |
|---|---|
Node |
build() |
NodeBuilder |
withAddress(io.atomix.utils.net.Address address)
Sets the node address.
|
NodeBuilder |
withAddress(int port)
Sets the node address using local host.
|
NodeBuilder |
withAddress(String address)
Sets the node address.
|
NodeBuilder |
withAddress(String host,
int port)
Sets the node host/port.
|
NodeBuilder |
withId(NodeId id)
Sets the node identifier.
|
NodeBuilder |
withId(String id)
Sets the node identifier.
|
public NodeBuilder withId(String id)
id - the node identifierpublic NodeBuilder withId(NodeId id)
id - the node identifierpublic NodeBuilder withAddress(String address)
address - a host:port tupleio.atomix.utils.net.MalformedAddressException - if a valid Address cannot be constructed from the argumentspublic NodeBuilder withAddress(String host, int port)
host - the host nameport - the port numberio.atomix.utils.net.MalformedAddressException - if a valid Address cannot be constructed from the argumentspublic NodeBuilder withAddress(int port)
port - the port numberio.atomix.utils.net.MalformedAddressException - if a valid Address cannot be constructed from the argumentspublic NodeBuilder withAddress(io.atomix.utils.net.Address address)
address - the node addressCopyright © 2013–2018. All rights reserved.