mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Merge DomainResource into DomainBase
This eliminates the use of Objectify polymorphism for EPP resources entirely (yay!), which makes the Registry 3.0 database migration easier. It is unfortunate that the naming parallelism of EppResources is lost between ContactResource, HostResource, and DomainResource, but the actual type as far as Datastore was concerned was DomainBase all along, and it would be a much more substantial data migration to allow us to continue using the class name DomainResource now that we're no longer using Objectify polymorphism. This simply isn't worth it. This also removes the polymorphic Datastore indexes (which will no longer function as of this change). The non-polymorphic replacement indexes were added in [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=230930546
This commit is contained in:
parent
97c2049669
commit
e2528875b2
166 changed files with 1525 additions and 1666 deletions
|
@ -26,7 +26,7 @@ import com.google.common.collect.ImmutableSet;
|
|||
import com.google.common.flogger.FluentLogger;
|
||||
import google.registry.dns.DnsQueue;
|
||||
import google.registry.mapreduce.MapreduceRunner;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.DomainBase;
|
||||
import google.registry.request.Action;
|
||||
import google.registry.request.Parameter;
|
||||
import google.registry.request.Response;
|
||||
|
@ -69,13 +69,13 @@ public class RefreshDnsForAllDomainsAction implements Runnable {
|
|||
.setDefaultMapShards(10)
|
||||
.runMapOnly(
|
||||
new RefreshDnsForAllDomainsActionMapper(tlds),
|
||||
ImmutableList.of(createEntityInput(DomainResource.class)))
|
||||
ImmutableList.of(createEntityInput(DomainBase.class)))
|
||||
.sendLinkToMapreduceConsole(response);
|
||||
}
|
||||
|
||||
/** Mapper to refresh DNS for all active domain resources. */
|
||||
public static class RefreshDnsForAllDomainsActionMapper
|
||||
extends Mapper<DomainResource, Void, Void> {
|
||||
extends Mapper<DomainBase, Void, Void> {
|
||||
|
||||
private static final long serialVersionUID = 1455544013508953083L;
|
||||
|
||||
|
@ -88,7 +88,7 @@ public class RefreshDnsForAllDomainsAction implements Runnable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void map(final DomainResource domain) {
|
||||
public void map(final DomainBase domain) {
|
||||
String domainName = domain.getFullyQualifiedDomainName();
|
||||
if (tlds.contains(domain.getTld())) {
|
||||
if (isActive(domain, DateTime.now(DateTimeZone.UTC))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue