Class AverageLoadTask

    • Field Detail

      • averageLoad1

        long averageLoad1
        load averages for the last minute.
      • averageLoad5

        long averageLoad5
        load averages for the past 5 minutes.
      • averageLoad15

        long averageLoad15
        load averages for the past 15 minutes.
    • Constructor Detail

      • AverageLoadTask

        public AverageLoadTask()
    • Method Detail

      • getAverageLoad1

        public float getAverageLoad1()
        Returns the load averages for the last minute.
        Returns:
        the load averages for the last minute.
      • getAverageLoad5

        public float getAverageLoad5()
        Returns the load averages for the past 5 minutes.
        Returns:
        the load averages for the past 5 minutes.
      • getAverageLoad15

        public float getAverageLoad15()
        Returns the load averages for the past 15 minutes.
        Returns:
        the load averages for the past 15 minutes.
      • convert

        float convert​(long average)
      • computeLoad

        long computeLoad​(long load,
                         long exp,
                         long n)
      • countActiveTasks

        protected abstract long countActiveTasks()
      • reset

        public void reset()
      • start

        protected final void start​(Timer timer)
        Starts the resulting task.
        Parameters:
        timer - Timer to use to schedule the resulting task.