Package io.grpc
Class Attributes.Builder
- java.lang.Object
-
- io.grpc.Attributes.Builder
-
- Enclosing class:
- Attributes
public static final class Attributes.Builder extends Object
The helper class to build an Attributes instance.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attributes
build()
Build the attributes.<T> Attributes.Builder
discard(Attributes.Key<T> key)
Removes the key and associated value from the attributes.<T> Attributes.Builder
set(Attributes.Key<T> key, T value)
Attributes.Builder
setAll(Attributes other)
-
-
-
Method Detail
-
set
public <T> Attributes.Builder set(Attributes.Key<T> key, T value)
-
discard
public <T> Attributes.Builder discard(Attributes.Key<T> key)
Removes the key and associated value from the attributes.- Parameters:
key
- The key to remove- Returns:
- this
- Since:
- 1.22.0
-
setAll
public Attributes.Builder setAll(Attributes other)
-
build
public Attributes build()
Build the attributes.
-
-