io.gravitee.node.monitoring.DefaultProbeEvaluator Maven / Gradle / Ivy
package io.gravitee.node.monitoring;
import io.gravitee.node.api.healthcheck.Probe;
import io.gravitee.node.api.healthcheck.ProbeEvaluator;
import io.gravitee.node.api.healthcheck.ProbeManager;
import io.gravitee.node.api.healthcheck.Result;
import java.time.Instant;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import lombok.RequiredArgsConstructor;
/**
* @author Jeoffrey HAEYAERT (jeoffrey.haeyaert at graviteesource.com)
* @author GraviteeSource Team
*/
@RequiredArgsConstructor
public class DefaultProbeEvaluator implements ProbeEvaluator {
protected static final long SAFEGUARD_DELAY = 5000L;
private final long cacheDurationMs;
private final ProbeManager probeManager;
private final Map lastProbeResults = new ConcurrentHashMap<>();
private Long lastEvaluation;
@Override
public CompletableFuture
© 2015 - 2025 Weber Informatics LLC | Privacy Policy