| Constructor and Description | 
|---|
| GangliaResourceMonitor(LoadCalculator loadCalculator,
                      String gmetadHost,
                      int gmetadPort)Make a new GangliaResourceMonitor that reads information from a ganglia
 meta daemon. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addNode(ResourceNode node)Adds a new  ResourceNodefor thisMonitorto manage (if
 node already exist, then should perform update) | 
| boolean | assignLoad(ResourceNode node,
          int loadValue) | 
| int | getLoad(ResourceNode node)Gets the load on a resource node available to the resource manager. | 
| ResourceNode | getNodeById(String nodeId)Gets the  ResourceNodewith the givennodeId. | 
| ResourceNode | getNodeByURL(URL ipAddr)Returns the  ResourceNodewith the givenipAddr. | 
| List | getNodes() | 
| boolean | reduceLoad(ResourceNode node,
          int loadValue)Reduces the load on a particular  ResourceNodeby the givenloadValue. | 
| void | removeNodeById(String nodeId)Remove  ResourceNodefrom thisMonitor | 
public GangliaResourceMonitor(LoadCalculator loadCalculator, String gmetadHost, int gmetadPort)
loadCalculator - LoadCalculator
            LoadCalculator
            to calculate loadpublic int getLoad(ResourceNode node) throws MonitorException
MonitorgetLoad in interface Monitornode - The ResourceNode to obtain the load for.ResourceNode.MonitorException - If there is any error obtaining the load.public boolean assignLoad(ResourceNode node, int loadValue) throws MonitorException
assignLoad in interface Monitornode - The ResourceNode to assign load to.loadValue - The integer load to assign to the given ResourceNode.MonitorException - If any error occurs assigning the load.public void addNode(ResourceNode node)
MonitorResourceNode for this Monitor to manage (if
 node already exist, then should perform update)addNode in interface Monitornode - The new ResourceNode to managepublic void removeNodeById(String nodeId)
ResourceNode from this MonitorremoveNodeById in interface MonitornodeId - The id of the ResourceNode to removepublic List getNodes() throws MonitorException
getNodes in interface MonitorList of the ResourceNodes known to the resource
         manager.MonitorException - If any error occurs getting the List of
           ResourceNodes.public ResourceNode getNodeById(String nodeId) throws MonitorException
MonitorResourceNode with the given nodeId.getNodeById in interface MonitorResourceNode for the corresponding nodeId.MonitorException - If any error occurs.public ResourceNode getNodeByURL(URL ipAddr) throws MonitorException
MonitorResourceNode with the given ipAddr.getNodeByURL in interface MonitoripAddr - The URL of the ResourceNode to return.ResourceNode with the given ipAddr.MonitorException - If any error occurs.public boolean reduceLoad(ResourceNode node, int loadValue) throws MonitorException
MonitorResourceNode by the given
 loadValue.reduceLoad in interface Monitornode - The ResourceNode to reduce the load on.loadValue - The amount of reduction.MonitorException - If any error occurs.Copyright © 1999–2017 Apache OODT. All rights reserved.