As a convention, annotations such as Grpc. is defined to associate
attribute Keys and their propagation paths. The annotation may be applied to a Key definition field, a method that returns Attributes, or a variable of type Attributes, to indicate that the annotated Attributes objects may contain the annotated
Key.
Javadoc users may click "USE" on the navigation bars of the annotation's javadoc page to view references of such annotation.
| Modifier and Type | Class and Description |
|---|---|
| public static class | Attributes.Builder
The helper class to build an Attributes instance. |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final IdentityHashMap | |
| public static final Attributes | |
| private static final IdentityHashMap |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the given object is aAttributes equal attributes.an object. o)Overrides java. Attributes with an equal attribute values.
|
| public <T> T | |
| public int | Returns: a hash code for the attributes map.Overrides java. |
| public Set | Returns: Set of Key objects.
Deprecated
This method is being considered for removal, if you feel this method is needed
please reach out on this Github issue:
grpc-java/issues/1764.
Returns set of keys stored in container.
|
| pack-priv Set | |
| public static Attributes. | newBuilder(Attributes base)
Deprecated
Use
Create a new builder that is pre-populated with the content from a given container.
Attributes#toBuilder() on the Attributes instance instead.
|
| public static Attributes. | |
| public Attributes. | Returns: a new builder.Creates a new builder that is pre-populated with the content of this container. |
| public String |
| data | back to summary |
|---|---|
| private final IdentityHashMap<Attributes. | |
| EMPTY | back to summary |
|---|---|
| public static final Attributes EMPTY | |
| EMPTY_MAP | back to summary |
|---|---|
| private static final IdentityHashMap<Attributes. | |
| Attributes | back to summary |
|---|---|
| private Attributes(IdentityHashMap<Attributes. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Returns true if the given object is also a Note that if a stored values are mutable, 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). This method is not implemented efficiently and is meant for testing.
| |
| get | back to summary |
|---|---|
| public <T> T get(Attributes. Gets the value for the key, or
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hash code for the attributes. Note that if a stored values are mutable, 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).
| |
| keys | back to summary |
|---|---|
| public Set Deprecated This method is being considered for removal, if you feel this method is needed please reach out on this Github issue: grpc-java/issues/1764. Returns set of keys stored in container.
| |
| keysForTest | back to summary |
|---|---|
| pack-priv Set | |
| newBuilder | back to summary |
|---|---|
| public static Attributes. Deprecated Use Create a new builder that is pre-populated with the content from a given container.
| |
| newBuilder | back to summary |
|---|---|
| public static Attributes. Create a new builder. | |
| toBuilder | back to summary |
|---|---|
| public Attributes. Creates a new builder that is pre-populated with the content of this container.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| private Attributes | |
| private IdentityHashMap |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Attributes | |
| private IdentityHashMap | |
| public <T> Attributes. | Returns: thisThe key to remove keyRemoves the key and associated value from the attribtues. |
| public <T> Attributes. | |
| public Attributes. |
| base | back to summary |
|---|---|
| private Attributes base | |
| newdata | back to summary |
|---|---|
| private IdentityHashMap<Attributes. | |
| Builder | back to summary |
|---|---|
| private Builder(Attributes base) | |
| build | back to summary |
|---|---|
| public Attributes build() Build the attributes. | |
| data | back to summary |
|---|---|
| private IdentityHashMap | |
| discard | back to summary |
|---|---|
| public <T> Attributes. Removes the key and associated value from the attribtues.
| |
| set | back to summary |
|---|---|
| public <T> Attributes. | |
| setAll | back to summary |
|---|---|
| public Attributes. | |
| Modifier and Type | Field and Description |
|---|---|
| private final String |
| Modifier and Type | Method and Description |
|---|---|
| public static < Key type T> Attributes. | |
| public static < Key type T> Attributes. | |
| public String |
| debugString | back to summary |
|---|---|
| private final String debugString | |
| Key | back to summary |
|---|---|
| private Key(String debugString) | |
| create | back to summary |
|---|---|
| public static <T> Attributes. Factory method for creating instances of
| |
| of | back to summary |
|---|---|
| public static <T> Attributes. Deprecated use Factory method for creating instances of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |