public class SystemLoad extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SystemLoad.NodeLoad
A record of a node in the cluster and its load factor
|
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,SystemLoad.NodeLoad> |
nodeLoads
The list of nodes and their current load
|
| Constructor and Description |
|---|
SystemLoad()
No-arg constructor needed by JAXB
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNodeLoad(SystemLoad.NodeLoad load)
Adds a node to the map of load values, overwriting an existing entry if the node is already present in the map
|
boolean |
containsHost(String host)
Returns true if the load map contains the host in question.
|
SystemLoad.NodeLoad |
get(String host)
Gets a specific host from the map, if present.
|
Collection<SystemLoad.NodeLoad> |
getNodeLoads()
Get the list of nodes and their current loadfactor.
|
void |
setNodeLoads(Collection<SystemLoad.NodeLoad> newLoads)
Sets the list of nodes and their current loadfactor.
|
String |
toString() |
void |
updateNodeLoad(String host,
float modifier)
Updates the load factor for a node
|
protected Map<String,SystemLoad.NodeLoad> nodeLoads
public Collection<SystemLoad.NodeLoad> getNodeLoads()
public void setNodeLoads(Collection<SystemLoad.NodeLoad> newLoads)
newLoads - the nodeLoads to setpublic void updateNodeLoad(String host, float modifier) throws NotFoundException
host - The host to updatemodifier - The modifier to apply to the loadNotFoundExceptionpublic void addNodeLoad(SystemLoad.NodeLoad load)
load - the nodeLoad to addpublic SystemLoad.NodeLoad get(String host)
host - The hostname of the host you are interested in.public boolean containsHost(String host)
host - The hostname of the host you are interested in.Copyright © 2009–2021 Opencast Project. All rights reserved.