Interface IHealthCheck

All Superinterfaces:
Runnable

public interface IHealthCheck extends Runnable
An health check is run on a regular basis, and if the dispatcher is interested, generates an event.
Author:
ActiveViam
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Logger
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Computes and creates a new health event for this health check.
    How computationally intensive this health check is.
    The level of the health event generated by this health check.
    The tags of the health event generated by this health check.
    default boolean
    Returns true if this health check has been cancelled and should not be run anymore.
    default void
    run()
     
  • Field Details

    • LOGGER

      static final Logger LOGGER
  • Method Details

    • getIntensity

      ComputationIntensity getIntensity()
      How computationally intensive this health check is.
      Returns:
      An estimate of the computation intensity of this health check.
    • getLevel

      Level getLevel()
      The level of the health event generated by this health check.
      Returns:
      The level of the health event.
    • getTags

      Set<String> getTags()
      The tags of the health event generated by this health check.
      Returns:
      The tags of the health event.
    • createEvent

      IHealthEvent createEvent()
      Computes and creates a new health event for this health check.

      The health events level and tags MUST match the ones of this IHealthCheck.

      Returns:
      The newly created health event.
    • run

      default void run()
      Specified by:
      run in interface Runnable
    • isCancelled

      default boolean isCancelled()
      Returns true if this health check has been cancelled and should not be run anymore.
      Returns:
      true if this health check has been cancelled and should not be run anymore.