Class DeleteExpiredDomainsAction

java.lang.Object
google.registry.batch.DeleteExpiredDomainsAction
All Implemented Interfaces:
Runnable

public class DeleteExpiredDomainsAction extends Object implements Runnable
An action that deletes all non-renewing domains whose expiration dates have now passed.

The registry runs on an autorenew domain model, so domains don't ever expire naturally; they are only ever autorenewed. However, in some situations (such as URS) we don't want this to happen. Thus, the domains are tagged as non-renewing and are deleted by the next daily invocation of this action once they are past the date at which they were to expire.

Note that this action works by running a superuser EPP domain delete command, and as a side effect of when domains are deleted (just past their expiration date), they are invariably in the autorenew grace period when this happens.

Note also that the delete flow may fail in the uncommon case that a non-autorenewing domain has a subordinate host. It is not trivial to handle this case automatically (as said host may be in use by other domains), nor is it possible to take the correct action without exercising some human judgment. Accordingly, such deletes will fail with SEVERE-level log messages every day when this action runs, thus alerting us that human action is needed to correctly process the delete.