Class SystemLoad.NodeLoad
java.lang.Object
org.opencastproject.serviceregistry.api.SystemLoad.NodeLoad
- All Implemented Interfaces:
Comparable<SystemLoad.NodeLoad>
- Enclosing class:
SystemLoad
A record of a node in the cluster and its load factor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected floatThis node's current loadprotected StringThis node's base URLprotected float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(SystemLoad.NodeLoad other) booleanexceeds(SystemLoad.NodeLoad other) floatgetHost()floatfloatvoidmodifyLoad(float modifier) Modifies the load for this nodevoidsetCurrentLoad(float load) voidvoidsetMaxLoad(float load)
-
Field Details
-
host
This node's base URL -
currentLoad
protected float currentLoadThis node's current load -
maxLoad
protected float maxLoad
-
-
Constructor Details
-
NodeLoad
public NodeLoad()No-arg constructor needed by JAXB -
NodeLoad
-
-
Method Details
-
getHost
- Returns:
- the host
-
setHost
- 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
- Specified by:
compareToin interfaceComparable<SystemLoad.NodeLoad>
-
exceeds
-