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
Modifier and TypeMethodDescriptionstatic <T> LoadBalancer.CreateSubchannelArgs.Key
<T> 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
.Returns the user supplied default value for this key.toString()
-
Method Details
-
create
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
Returns the user supplied default value for this key. -
toString
-