SocketAddresses 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.
| Modifier and Type | Class and Description |
|---|---|
| public static @interface | EquivalentAddressGroup.Attr
Annotation for |
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| public static final Attributes. | ATTR_AUTHORITY_OVERRIDE
The authority to be used when constructing Subchannels for this EquivalentAddressGroup. |
| private final Attributes | |
| private final int | hashCode
|
| Access | Constructor and Description |
|---|---|
| public | |
| public | EquivalentAddressGroup(List<SocketAddress> addrs, Attributes attrs)
List constructor with |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. EquivalentAddressGroup with an equal
address list and equal attribute values.
|
| public List | |
| public Attributes | |
| public int | |
| public String |
| addrs | back to summary |
|---|---|
| private final List<SocketAddress> addrs | |
| ATTR_AUTHORITY_OVERRIDE | back to summary |
|---|---|
| public static final Attributes. The authority to be used when constructing Subchannels for this EquivalentAddressGroup.
However, if the channel has overridden authority via
The authority must be from a trusted source, because if the authority is tampered with, RPCs may be sent to attackers which may leak sensitive user data. If the authority was acquired by doing I/O, the communication must be authenticated (e.g., via TLS). Recognize that the server that provided the authority can trivially impersonate the service.
| |
| attrs | back to summary |
|---|---|
| private final Attributes attrs | |
| hashCode | back to summary |
|---|---|
| private final int hashCode
| |
| EquivalentAddressGroup | back to summary |
|---|---|
| public EquivalentAddressGroup(List<SocketAddress> addrs) List constructor without | |
| EquivalentAddressGroup | back to summary |
|---|---|
| public EquivalentAddressGroup(List<SocketAddress> addrs, Attributes attrs) List constructor with | |
| EquivalentAddressGroup | back to summary |
|---|---|
| public EquivalentAddressGroup(SocketAddress addr) Singleton constructor without Attributes. | |
| EquivalentAddressGroup | back to summary |
|---|---|
| public EquivalentAddressGroup(SocketAddress addr, Attributes attrs) Singleton constructor with Attributes. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Returns true if the given object is also an Note that if the attributes include mutable values, 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).
| |
| getAddresses | back to summary |
|---|---|
| public List Returns an immutable list of the addresses. | |
| getAttributes | back to summary |
|---|---|
| public Attributes getAttributes() Returns the attributes.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
EquivalentAddressGroup's attributes. It follows the annotation semantics
defined by Attributes.