Class DnsResolverUtil
java.lang.Object
org.apache.pulsar.common.util.netty.DnsResolverUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyJdkDnsCacheSettings
(io.netty.resolver.dns.DnsNameResolverBuilder dnsNameResolverBuilder) Configure Netty'sDnsNameResolverBuilder
's ttl and negativeTtl to match the JDK's DNS caching settings.
-
Method Details
-
applyJdkDnsCacheSettings
public static void applyJdkDnsCacheSettings(io.netty.resolver.dns.DnsNameResolverBuilder dnsNameResolverBuilder) Configure Netty'sDnsNameResolverBuilder
'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 NettyDnsNameResolverBuilder
instance to apply the settings
-