Class AlertRegistry

java.lang.Object
ch.rswk.meta.engine.AlertRegistry

@Singleton public class AlertRegistry extends Object
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • MANUAL_ALERT_EXPIRATION

      private static final Duration MANUAL_ALERT_EXPIRATION
    • currentAlerts

      private final List<AlertRegistry.Alert> currentAlerts
    • healthCheckRegistry

      private final com.codahale.metrics.health.HealthCheckRegistry healthCheckRegistry
    • manualAlertCache

      private final com.github.benmanes.caffeine.cache.Cache<String,AlertRegistry.Alert> manualAlertCache
  • Constructor Details

    • AlertRegistry

      @Inject public AlertRegistry(com.codahale.metrics.health.HealthCheckRegistry healthCheckRegistry)
  • Method Details

    • registerGaugeAlert

      public <T extends Comparable<T>> void registerGaugeAlert(com.codahale.metrics.Gauge<T> gauge, T high, T low, String name)
    • registerCounterAlert

      public void registerCounterAlert(com.codahale.metrics.Counter counter, long high, long low, String name)
    • registerMeterAlert

      public void registerMeterAlert(double high, com.codahale.metrics.Meter meter, String name)
    • registerTimerAlert

      public void registerTimerAlert(double high, double meanHigh, String name, com.codahale.metrics.Timer timer)
    • addManualAlert

      public void addManualAlert(AlertRegistry.Alert entry)
    • checkAlerts

      public List<AlertRegistry.Alert> checkAlerts()
    • currentAlerts

      public List<AlertRegistry.Alert> currentAlerts()