Package io.grpc

Class 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 Detail

      • createWithDefault

        public static <T> LoadBalancer.CreateSubchannelArgs.Key<T> createWithDefault​(java.lang.String debugString,
                                                                                     T defaultValue)
        Factory method for creating instances of LoadBalancer.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 class java.lang.Object