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 java.lang.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(java.lang.String debugString)
Factory method for creating instances ofLoadBalancer.CreateSubchannelArgs.Key
.static <T> LoadBalancer.CreateSubchannelArgs.Key<T>
createWithDefault(java.lang.String debugString, T defaultValue)
Factory method for creating instances ofLoadBalancer.CreateSubchannelArgs.Key
.T
getDefault()
Returns the user supplied default value for this key.java.lang.String
toString()
-
-
-
Method Detail
-
create
public static <T> LoadBalancer.CreateSubchannelArgs.Key<T> create(java.lang.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(java.lang.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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-