edu.washington.cs.pl_if.plc
Class PLCentralController

java.lang.Object
  extended by edu.washington.cs.pl_if.plc.PLCentralController

public class PLCentralController
extends Object


Constructor Summary
PLCentralController(Credentials cred)
           
 
Method Summary
 int addHostsToSlice(String[] hostnames)
           
 PlanetLabHost[] getAllHosts()
          returns all nodes that are in "boot" state
 PlanetLabHost[] getAvailableHosts()
           
 double getCoMonProgress()
           
 PlanetLabHost getHost(int plcHostId)
           
 PlanetLabHost getHost(String hostname)
           
 PlanetLabHost[] getHostsNotInSlice()
           
 PlanetLabHost getRandomHostFromSite(PlanetLabHost oldHost)
           
 PlanetLabHost getRandomHostFromSite(PlanetLabSite site)
           
 PlanetLabHost[] getRandomNodes(int num)
          Send a query for num random nodes.
 PlanetLabHost[] getRandomSites(int num)
           
 PlanetLabSite getSite(PlanetLabHost host)
           
 void setCoMonData(PlanetLabHost[] hosts)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PLCentralController

public PLCentralController(Credentials cred)
Method Detail

addHostsToSlice

public int addHostsToSlice(String[] hostnames)

getHostsNotInSlice

public PlanetLabHost[] getHostsNotInSlice()

getRandomSites

public PlanetLabHost[] getRandomSites(int num)

getRandomHostFromSite

public PlanetLabHost getRandomHostFromSite(PlanetLabHost oldHost)

getRandomHostFromSite

public PlanetLabHost getRandomHostFromSite(PlanetLabSite site)

getRandomNodes

public PlanetLabHost[] getRandomNodes(int num)
Send a query for num random nodes. This function only returns nodes in "boot" state (more likely to be up)

Parameters:
num - number of requested nodes
Returns:
PlanetLabHost[] of num randomly selected nodes, or all available nodes if num>=avalable nodes

getAllHosts

public PlanetLabHost[] getAllHosts()
returns all nodes that are in "boot" state

Returns:

getAvailableHosts

public PlanetLabHost[] getAvailableHosts()

getHost

public PlanetLabHost getHost(String hostname)

getHost

public PlanetLabHost getHost(int plcHostId)

getSite

public PlanetLabSite getSite(PlanetLabHost host)

setCoMonData

public void setCoMonData(PlanetLabHost[] hosts)

getCoMonProgress

public double getCoMonProgress()