Class DnsResolverUtil

java.lang.Object
org.apache.pulsar.common.util.netty.DnsResolverUtil

public class DnsResolverUtil extends Object
  • Method Details

    • applyJdkDnsCacheSettings

      public static void applyJdkDnsCacheSettings(io.netty.resolver.dns.DnsNameResolverBuilder dnsNameResolverBuilder)
      Configure Netty's DnsNameResolverBuilder's ttl and negativeTtl to match the JDK's DNS caching settings. If the JDK setting for TTL is forever (-1), the TTL will be set to 60 seconds.
      Parameters:
      dnsNameResolverBuilder - The Netty DnsNameResolverBuilder instance to apply the settings