Class DomainsRefresher

java.lang.Object
google.registry.bsa.persistence.DomainsRefresher

public final class DomainsRefresher extends Object
Rechecks the registered/reserved domain names in the database for changes.

A registered/reserved domain name may change status in the following cases:

  • A domain whose reason for being unblockable is `REGISTERED` will become blockable when the domain is deregistered.
  • A domain whose reason for being unblockable is `REGISTERED` will have its reason changed to `RESERVED` if the domain is also on the reserved list.
  • A domain whose reason for being unblockable is `RESERVED` will become blockable when the domain is removed from the reserve list.
  • A domain whose reason for being unblockable is `RESERVED` will have its reason changed to `REGISTERED` if the domain is also on the reserved list.
  • A blockable domain becomes unblockable when it is added to the reserve list.
  • A blockable domain becomes unblockable when it is registered (with admin override).

As a reminder, invalid domain names are not stored in the database. They change status only when IDNs change in the TLDs, which rarely happens, and will be handled by dedicated procedures.

Domain blockability changes must be reported to BSA as follows:

  • A blockable domain becoming unblockable: an addition
  • An unblockable domain becoming blockable: a removal
  • An unblockable domain with reason change: a removal followed by an insertion.

Since BSA has separate endpoints for receiving blockability changes, removals must be sent before additions.

  • Constructor Details

    • DomainsRefresher

      public DomainsRefresher(org.joda.time.DateTime prevRefreshStartTime, org.joda.time.DateTime now, org.joda.time.Duration domainTxnMaxDuration, int transactionBatchSize)
  • Method Details

    • checkForBlockabilityChanges

      public com.google.common.collect.ImmutableList<UnblockableDomainChange> checkForBlockabilityChanges()
    • refreshStaleUnblockables

      public com.google.common.collect.ImmutableList<UnblockableDomainChange> refreshStaleUnblockables()
      Returns all changes to unblockable domains that have been reported to BSA. Please see UnblockableDomainChange for types of possible changes. Note that invalid domain names are not covered by this class and will be handled separately.

      The number of changes are expected to be small for now. It is limited by the number of domain deregistrations and the number of names added or removed from the reserved lists since the previous refresh.

    • getNewUnblockables

      public com.google.common.collect.ImmutableList<UnblockableDomainChange> getNewUnblockables()
    • applyUnblockableChanges

      public void applyUnblockableChanges(com.google.common.collect.ImmutableList<UnblockableDomainChange> changes)