Class LeastResourceUsage

  • All Implemented Interfaces:
    ScorePlugin

    public class LeastResourceUsage
    extends java.lang.Object
    implements ScorePlugin
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getWeight()
      How heavily should this scoring plugin be considered in the scheduling algorithm
      double score​(uk.co.ractf.polaris.api.task.Task task, uk.co.ractf.polaris.api.node.NodeInfo nodeInfo)
      Scores how well a Task can run on a given NodeInfo.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LeastResourceUsage

        public LeastResourceUsage()
    • Method Detail

      • score

        public double score​(uk.co.ractf.polaris.api.task.Task task,
                            uk.co.ractf.polaris.api.node.NodeInfo nodeInfo)
        Description copied from interface: ScorePlugin
        Scores how well a Task can run on a given NodeInfo. The returned double has no bounds but should be normalised across all nodes to be between 0 and 1.
        Specified by:
        score in interface ScorePlugin
        Parameters:
        task - the task
        nodeInfo - the node to score
        Returns:
        the score
      • getWeight

        public int getWeight()
        Description copied from interface: ScorePlugin
        How heavily should this scoring plugin be considered in the scheduling algorithm
        Specified by:
        getWeight in interface ScorePlugin
        Returns:
        the weight