Class CachingHostnameLookupResolver

    • Constructor Detail

      • CachingHostnameLookupResolver

        public CachingHostnameLookupResolver()
        Create a new instance with all default settings: - rDNS lookup enabled - no cache size metric - max 5000 elements in the cache - 5 minutes refresh TTL - 1 hour expiry TTL
      • CachingHostnameLookupResolver

        public CachingHostnameLookupResolver​(boolean disableRdnsLookup,
                                             @Nullable
                                             com.yammer.metrics.core.MetricName metricName)
        Create a new instance with default cache settings: - max 5000 elements in the cache - 5 minutes refresh TTL - 1 hour expiry TTL
        Parameters:
        disableRdnsLookup - if true, simply return a string representation of the IP address
        metricName - if specified, use this metric for the cache size gauge.
      • CachingHostnameLookupResolver

        public CachingHostnameLookupResolver​(boolean disableRdnsLookup,
                                             @Nullable
                                             com.yammer.metrics.core.MetricName metricName,
                                             int maxSize,
                                             Duration cacheRefreshTtl,
                                             Duration cacheExpiryTtl)
        Create a new instance with specific cache settings:
        Parameters:
        disableRdnsLookup - if true, simply return a string representation of the IP address.
        metricName - if specified, use this metric for the cache size gauge.
        maxSize - max cache size.
        cacheRefreshTtl - trigger cache refresh after specified duration
        cacheExpiryTtl - expire items after specified duration