ResolvedServerInfoGroup
.@Deprecated @ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/1770") @Immutable public final class ResolvedServerInfo extends Object
NameResolver
.Constructor and Description |
---|
ResolvedServerInfo(SocketAddress address)
Deprecated.
Constructs a new resolved server without attributes.
|
ResolvedServerInfo(SocketAddress address,
Attributes attributes)
Deprecated.
Constructs a new resolved server with attributes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Deprecated.
Returns true if the given object is also a
ResolvedServerInfo with an equal address
and equal attribute values. |
SocketAddress |
getAddress()
Deprecated.
Returns the address.
|
Attributes |
getAttributes()
Deprecated.
Returns the associated attributes.
|
int |
hashCode()
Deprecated.
Returns a hash code for the server info.
|
String |
toString()
Deprecated.
|
public ResolvedServerInfo(SocketAddress address)
address
- the address of the serverpublic ResolvedServerInfo(SocketAddress address, Attributes attributes)
address
- the address of the serverattributes
- attributes associated with this address.public SocketAddress getAddress()
public Attributes getAttributes()
public boolean equals(Object o)
ResolvedServerInfo
with an equal address
and equal attribute values.
Note that if a resolver includes mutable values in the attributes, it is possible for two objects to be considered equal at one point in time and not equal at another (due to concurrent mutation of attribute values).
equals
in class Object
o
- an object.ResolvedServerInfo
with an equal address and
equal attributes.public int hashCode()
Note that if a resolver includes mutable values in the attributes, this object's hash code could change over time. So care must be used when putting these objects into a set or using them as keys for a map.