Class DownTimeGauge

  • All Implemented Interfaces:
    Gauge<Long>, Metric

    public class DownTimeGauge
    extends Object
    implements Gauge<Long>
    A gauge that returns (in milliseconds) how long a job has not been not running any more, in case it is in a failing/recovering situation. Running jobs return naturally a value of zero.

    For jobs that have never run (new not yet scheduled jobs) or jobs that have run again after failing, this gauge returns 0L, and for jobs that are not running any more, it returns -1L.

    • Constructor Detail

    • Method Detail

      • getValue

        public Long getValue()
        Description copied from interface: Gauge
        Calculates and returns the measured value.
        Specified by:
        getValue in interface Gauge<Long>
        Returns:
        calculated value