All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.bund.bva.isyfact.ueberwachung.actuate.health.IsyHealthTask Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
package de.bund.bva.isyfact.ueberwachung.actuate.health;

import org.springframework.util.Assert;

import de.bund.bva.isyfact.logging.IsyLogger;
import de.bund.bva.isyfact.logging.IsyLoggerFactory;
import de.bund.bva.isyfact.task.model.AbstractTask;

/**
 * This Task updates the cache in {@link IsyHealthContributorRegistryCache}.
 */
public class IsyHealthTask extends AbstractTask {

    private static final IsyLogger LOGISY = IsyLoggerFactory.getLogger(IsyHealthTask.class);

    private final IsyCachingHealthContributorRegistry cachingHealthContributorRegistry;

    public IsyHealthTask(IsyCachingHealthContributorRegistry cachingHealthContributorRegistry) {
        Assert.notNull(cachingHealthContributorRegistry,
        "IsyCachingHealthContributorRegistry must not be null");
        this.cachingHealthContributorRegistry = cachingHealthContributorRegistry;
    }

    @Override
    public void execute() {
        LOGISY.debug("Starte Health Caching");

        cachingHealthContributorRegistry.updateCache();

        LOGISY.debug("Health Cache aktualisiert");
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy