Package io.grpc
Class LoadBalancer.CreateSubchannelArgs.Key<T>
- java.lang.Object
-
- io.grpc.LoadBalancer.CreateSubchannelArgs.Key<T>
-
- Enclosing class:
- LoadBalancer.CreateSubchannelArgs
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1771") public static final class LoadBalancer.CreateSubchannelArgs.Key<T> extends Object
Key for a key-value pair. Uses reference equality.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> LoadBalancer.CreateSubchannelArgs.Key<T>
create(String debugString)
Factory method for creating instances ofLoadBalancer.CreateSubchannelArgs.Key
.static <T> LoadBalancer.CreateSubchannelArgs.Key<T>
createWithDefault(String debugString, T defaultValue)
Factory method for creating instances ofLoadBalancer.CreateSubchannelArgs.Key
.T
getDefault()
Returns the user supplied default value for this key.String
toString()
-
-
-
Method Detail
-
create
public static <T> LoadBalancer.CreateSubchannelArgs.Key<T> create(String debugString)
Factory method for creating instances ofLoadBalancer.CreateSubchannelArgs.Key
. The default value of the key isnull
.- Type Parameters:
T
- Key type- Parameters:
debugString
- a debug string that describes this key.- Returns:
- Key object
-
createWithDefault
public static <T> LoadBalancer.CreateSubchannelArgs.Key<T> createWithDefault(String debugString, T defaultValue)
Factory method for creating instances ofLoadBalancer.CreateSubchannelArgs.Key
.- Type Parameters:
T
- Key type- Parameters:
debugString
- a debug string that describes this key.defaultValue
- default value to return when value for key not set- Returns:
- Key object
-
getDefault
public T getDefault()
Returns the user supplied default value for this key.
-
-