Package google.registry.dns
Class DnsUtils
java.lang.Object
google.registry.dns.DnsUtils
Utility class to handle DNS refresh requests.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The possible values of theDNS_TARGET_TYPE_PARAM
parameter. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
deleteRequests
(Collection<DnsRefreshRequest> requests) Removes the requests that have been processed.static long
getDnsAPlusAAAATtlForHost
(String host, org.joda.time.Duration dnsDefaultATtl) 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.static void
requestDomainDnsRefresh
(com.google.common.collect.ImmutableCollection<String> names) static void
requestDomainDnsRefresh
(com.google.common.collect.ImmutableCollection<String> names, org.joda.time.Duration delay) static void
requestDomainDnsRefresh
(String domainName) static void
requestDomainDnsRefresh
(String domainName, org.joda.time.Duration delay) static void
requestHostDnsRefresh
(com.google.common.collect.ImmutableCollection<String> hostNames) static void
requestHostDnsRefresh
(String hostName)
-
Field Details
-
DNS_PUBLISH_PUSH_QUEUE_NAME
The name of the DNS publish push queue.- See Also:
-
-
Method Details
-
requestDomainDnsRefresh
-
requestDomainDnsRefresh
public static void requestDomainDnsRefresh(com.google.common.collect.ImmutableCollection<String> names, org.joda.time.Duration delay) -
requestDomainDnsRefresh
-
requestDomainDnsRefresh
public static void requestDomainDnsRefresh(com.google.common.collect.ImmutableCollection<String> names) -
requestHostDnsRefresh
-
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
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
-