Class SystemLoad.NodeLoad

java.lang.Object
org.opencastproject.serviceregistry.api.SystemLoad.NodeLoad
All Implemented Interfaces:
Comparable<SystemLoad.NodeLoad>
Enclosing class:
SystemLoad

public static class SystemLoad.NodeLoad extends Object implements Comparable<SystemLoad.NodeLoad>
A record of a node in the cluster and its load factor
  • Field Details

    • host

      protected String host
      This node's base URL
    • currentLoad

      protected float currentLoad
      This node's current load
    • maxLoad

      protected float maxLoad
  • Constructor Details

    • NodeLoad

      public NodeLoad()
      No-arg constructor needed by JAXB
    • NodeLoad

      public NodeLoad(String host, float currentload, float maxload)
  • Method Details

    • getHost

      public String getHost()
      Returns:
      the host
    • setHost

      public void setHost(String host)
      Parameters:
      host - the host to set
    • getLoadFactor

      public float getLoadFactor()
      Returns:
      the load factor, current / maxload
    • modifyLoad

      public void modifyLoad(float modifier)
      Modifies the load for this node
      Parameters:
      modifier - the amount to add or subtract from the current load
    • getCurrentLoad

      public float getCurrentLoad()
    • setCurrentLoad

      public void setCurrentLoad(float load)
    • getMaxLoad

      public float getMaxLoad()
    • setMaxLoad

      public void setMaxLoad(float load)
    • compareTo

      public int compareTo(SystemLoad.NodeLoad other)
      Specified by:
      compareTo in interface Comparable<SystemLoad.NodeLoad>
    • exceeds

      public boolean exceeds(SystemLoad.NodeLoad other)