Package io.grpc

Class NameResolver.Args.Key<T>

  • Type Parameters:
    T - type of values that can be stored under this key
    Enclosing class:
    NameResolver.Args

    @Immutable
    public static final class NameResolver.Args.Key<T>
    extends Object
    Identifies an externally-defined custom argument that can be stored in NameResolver.Args.

    Uses reference equality so keys should be defined as global constants.

    • Method Detail

      • create

        public static <T> NameResolver.Args.Key<T> create​(String debugString)
        Creates a new instance of NameResolver.Args.Key.
        Type Parameters:
        T - Key type
        Parameters:
        debugString - a string used to describe the key, used for debugging.
        Returns:
        a new instance of Key