@NotThreadSafe public final class Address extends Object implements Serializable
Modifier | Constructor and Description |
---|---|
|
Address()
Creates a new instance of
Address . |
protected |
Address(NetAddress netAddress)
Creates a new instance of
Address from proto representation. |
|
Address(String hostname,
int rpcPort)
Creates a new instance of
Address . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static Address |
fromProto(NetAddress address)
Creates a new instance of
Address from proto representation. |
String |
getHost() |
int |
getRpcPort() |
int |
hashCode() |
Address |
setHost(String host) |
Address |
setRpcPort(int rpcPort) |
NetAddress |
toProto() |
String |
toString() |
public Address()
Address
.public Address(String hostname, int rpcPort)
Address
.hostname
- the hostname to setrpcPort
- the rpc port to setprotected Address(NetAddress netAddress)
Address
from proto representation.netAddress
- the proto master addresspublic String getHost()
public int getRpcPort()
public Address setRpcPort(int rpcPort)
rpcPort
- the rpc port to usepublic NetAddress toProto()
public static Address fromProto(NetAddress address)
Address
from proto representation.address
- the proto representation of a master addressCopyright © 2023. All Rights Reserved.