public class PeerAddress extends java.lang.Object implements XdrElement
struct PeerAddress { union switch (IPAddrType type) { case IPv4: opaque ipv4[4]; case IPv6: opaque ipv6[16]; } ip; uint32 port; uint32 numFailures; };
Modifier and Type | Class and Description |
---|---|
static class |
PeerAddress.PeerAddressBuilder |
static class |
PeerAddress.PeerAddressIp
PeerAddressIp's original definition in the XDR file is:
|
Constructor and Description |
---|
PeerAddress() |
PeerAddress(PeerAddress.PeerAddressIp ip,
Uint32 port,
Uint32 numFailures) |
Modifier and Type | Method and Description |
---|---|
static PeerAddress.PeerAddressBuilder |
builder() |
static PeerAddress |
decode(XdrDataInputStream stream) |
void |
encode(XdrDataOutputStream stream) |
boolean |
equals(java.lang.Object o) |
static PeerAddress |
fromXdrBase64(java.lang.String xdr) |
static PeerAddress |
fromXdrByteArray(byte[] xdr) |
PeerAddress.PeerAddressIp |
getIp() |
Uint32 |
getNumFailures() |
Uint32 |
getPort() |
int |
hashCode() |
void |
setIp(PeerAddress.PeerAddressIp ip) |
void |
setNumFailures(Uint32 numFailures) |
void |
setPort(Uint32 port) |
PeerAddress.PeerAddressBuilder |
toBuilder() |
java.lang.String |
toString() |
toXdrBase64, toXdrByteArray
public PeerAddress()
public PeerAddress(PeerAddress.PeerAddressIp ip, Uint32 port, Uint32 numFailures)
public void encode(XdrDataOutputStream stream) throws java.io.IOException
encode
in interface XdrElement
java.io.IOException
public static PeerAddress decode(XdrDataInputStream stream) throws java.io.IOException
java.io.IOException
public static PeerAddress fromXdrBase64(java.lang.String xdr) throws java.io.IOException
java.io.IOException
public static PeerAddress fromXdrByteArray(byte[] xdr) throws java.io.IOException
java.io.IOException
public static PeerAddress.PeerAddressBuilder builder()
public PeerAddress.PeerAddressBuilder toBuilder()
public PeerAddress.PeerAddressIp getIp()
public Uint32 getPort()
public Uint32 getNumFailures()
public void setIp(PeerAddress.PeerAddressIp ip)
public void setPort(Uint32 port)
public void setNumFailures(Uint32 numFailures)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object