@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/1770") public final class EquivalentAddressGroup extends Object
SocketAddress
es that are considered equivalent when channel makes connections.
Usually the addresses are addresses resolved from the same host name, and connecting to any of them is equally sufficient. They do have order. An address appears earlier on the list is likely to be tried earlier.
Constructor and Description |
---|
EquivalentAddressGroup(List<SocketAddress> addrs) |
EquivalentAddressGroup(SocketAddress addr) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
List<SocketAddress> |
getAddresses()
Returns an immutable list of the addresses.
|
int |
hashCode() |
String |
toString() |
public EquivalentAddressGroup(List<SocketAddress> addrs)
public EquivalentAddressGroup(SocketAddress addr)
public List<SocketAddress> getAddresses()