Class DnsUtils

java.lang.Object
google.registry.dns.DnsUtils

public final class DnsUtils extends Object
Utility class to handle DNS refresh requests.
  • Field Details

    • DNS_PUBLISH_PUSH_QUEUE_NAME

      public static final String DNS_PUBLISH_PUSH_QUEUE_NAME
      The name of the DNS publish push queue.
      See Also:
  • Method Details

    • requestDomainDnsRefresh

      public static void requestDomainDnsRefresh(String domainName, org.joda.time.Duration delay)
    • requestDomainDnsRefresh

      public static void requestDomainDnsRefresh(com.google.common.collect.ImmutableCollection<String> names, org.joda.time.Duration delay)
    • requestDomainDnsRefresh

      public static void requestDomainDnsRefresh(String domainName)
    • requestDomainDnsRefresh

      public static void requestDomainDnsRefresh(com.google.common.collect.ImmutableCollection<String> names)
    • requestHostDnsRefresh

      public static void requestHostDnsRefresh(String hostName)
    • requestHostDnsRefresh

      public static void requestHostDnsRefresh(com.google.common.collect.ImmutableCollection<String> hostNames)
    • readAndUpdateRequestsWithLatestProcessTime

      public static com.google.common.collect.ImmutableList<DnsRefreshRequest> readAndUpdateRequestsWithLatestProcessTime(String tld, org.joda.time.Duration cooldown, int batchSize)
      Returns pending DNS update requests that need further processing up to batch size, in ascending order of their request time, and updates their processing time to now.

      The criteria to pick the requests to include are:

      • They are for the given TLD.
      • Their request time is not in the future.
      • The last time they were processed is before the cooldown period.
    • deleteRequests

      public static void deleteRequests(Collection<DnsRefreshRequest> requests)
      Removes the requests that have been processed.

      Note that if a request entity has already been deleted, the method still succeeds without error because all we care about is that it no longer exists after the method runs.

    • getDnsAPlusAAAATtlForHost

      public static long getDnsAPlusAAAATtlForHost(String host, org.joda.time.Duration dnsDefaultATtl)