class SocketAddressResolver {

    private final DnsResolver dnsResolver;

    /**
     * Create a new {@link SocketAddressResolver}.
     *
     * @since 6.1
     */
    protected SocketAddressResolver() {
        this(DnsResolver.unresolved());
    }

    /**
     * Create a new {@link SocketAddressResolver} given {@link DnsResolver}.
     *
     * @param dnsResolver must not be {@code null}.
     * @since 5.1
     */
    protected SocketAddressResolver(DnsResolver dnsResolver) {

        LettuceAssert.notNull(dnsResolver, "DnsResolver must not be null");

        this.dnsResolver = dnsResolver;
    }

    /**
     * Create a new {@link SocketAddressResolver} given {@link DnsResolver}.
     *
     * @param dnsResolver must not be {@code null}.
     * @return the {@link SocketAddressResolver}.
     * @since 5.1
     */
    public static SocketAddressResolver create(DnsResolver dnsResolver) {
        return new SocketAddressResolver(dnsResolver);
    }

    /**
     * Resolve a {@link RedisURI} to a {@link SocketAddress}.
     *
     * @param redisURI must not be {@code null}.
     * @return the resolved {@link SocketAddress}.
     * @since 5.1
     */
    public SocketAddress resolve(RedisURI redisURI) {<FILL_FUNCTION_BODY>}

    /**
     * Resolves a {@link io.lettuce.core.RedisURI} to a {@link java.net.SocketAddress}.
     *
     * @param redisURI must not be {@code null}.
     * @param dnsResolver must not be {@code null}.
     * @return the resolved {@link SocketAddress}.
     */
    public static SocketAddress resolve(RedisURI redisURI, DnsResolver dnsResolver) {

        if (redisURI.getSocket() != null) {
            return getDomainSocketAddress(redisURI);
        }

        try {
            InetAddress[] inetAddress = dnsResolver.resolve(redisURI.getHost());

            if (inetAddress.length == 0) {
                return InetSocketAddress.createUnresolved(redisURI.getHost(), redisURI.getPort());
            }

            return new InetSocketAddress(inetAddress[0], redisURI.getPort());
        } catch (UnknownHostException e) {
            return new InetSocketAddress(redisURI.getHost(), redisURI.getPort());
        }
    }

    static SocketAddress getDomainSocketAddress(RedisURI redisURI) {

        if (KqueueProvider.isAvailable() || EpollProvider.isAvailable()) {
            EventLoopResources resources = KqueueProvider.isAvailable() ? KqueueProvider.getResources()
                    : EpollProvider.getResources();
            return resources.newSocketAddress(redisURI.getSocket());
        }

        throw new IllegalStateException(
                "No native transport available. Make sure that either netty's epoll or kqueue library is on the class path and supported by your operating system.");
    }

}


        LettuceAssert.notNull(redisURI, "RedisURI must not be null");

        return resolve(redisURI, dnsResolver);
    
<no_super_class>