Class Priority


  • @Immutable
    public final class Priority
    extends Object
    Task (and split) priority is composed of a level and a within-level priority. Level decides which queue the split is placed in, while within-level priority decides which split is executed next in that level.

    Tasks move from a lower to higher level as they exceed level thresholds of total scheduled time accrued to a task.

    The priority within a level increases with the scheduled time accumulated in that level. This is necessary to achieve fairness when tasks acquire scheduled time at varying rates.

    However, this priority is not equal to the task total accrued scheduled time. When a task graduates to a higher level, the level priority is set to the minimum current priority in the new level. This allows us to maintain instantaneous fairness in terms of scheduled time.

    • Constructor Detail

      • Priority

        public Priority​(int level,
                        long levelPriority)
    • Method Detail

      • getLevel

        public int getLevel()
      • getLevelPriority

        public long getLevelPriority()