Class LoadAverageCircuitBreaker

  • All Implemented Interfaces:
    Closeable, AutoCloseable, NamedListInitializedPlugin

    public class LoadAverageCircuitBreaker
    extends CircuitBreaker
    Tracks current system load average and triggers if the specified threshold is breached.

    This circuit breaker gets the load average (length of the run queue) over the last minute and uses that data to take a decision. We depend on OperatingSystemMXBean which does not allow a configurable interval of collection of data.

    • Constructor Detail

      • LoadAverageCircuitBreaker

        public LoadAverageCircuitBreaker()
    • Method Detail

      • setThreshold

        public void setThreshold​(double thresholdValueUnbounded)
      • getLoadAverageThreshold

        public double getLoadAverageThreshold()
      • calculateLiveLoadAverage

        protected double calculateLiveLoadAverage()