class ContactInformationMaintainer extends ControllerMaintainer {

    @Override
    protected boolean maintain() {
        TenantController tenants = controller().tenants();
        boolean success = true;
        for (Tenant tenant : tenants.asList()) {
            log.log(INFO, "Updating contact information for " + tenant);
            try {
                switch (tenant.type()) {
                    case athenz:
                        tenants.lockIfPresent(tenant.name(), LockedTenant.Athenz.class, lockedTenant -> {
                            Contact contact = contactRetriever.getContact(lockedTenant.get().propertyId());
                            log.log(INFO, "Contact found for " + tenant + " was " +
                                          (Optional.of(contact).equals(tenant.contact()) ? "un" : "") + "changed");
                            tenants.store(lockedTenant.with(contact));
                        });
                        break;
                    case cloud:
                        break;
                    default:
                        throw new IllegalArgumentException("Unexpected tenant type '" + tenant.type() + "'.");
                }
            } catch (Exception e) {
                success = false;
                log.log(Level.WARNING, "Failed to update contact information for " + tenant + ": " +
                                       Exceptions.toMessageString(e) + ". Retrying in " +
                                       interval());
            }
        }
        return success;
    }

    public  ContactInformationMaintainer(Controller controller, Duration interval);

}