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