|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
edu.washington.cs.pl_if.ssh.ConnectionController
public class ConnectionController
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ConnectionController(Credentials cred)
|
Method Summary | |
---|---|
int |
addHostsToSlice(String[] hostnames)
|
int |
addRandomHostsFromPLC(int num)
requests num randomly selected hosts from PLC and tries to connect to them. |
int |
addRandomSitesFromPLC(int num)
requests num randomly selected sites from PLC and tries to connect to a random host in each of the sites them. |
int |
connectToHost(PlanetLabHost host,
String connectFailedPolicy)
initiate the connection sequece to host "host" |
void |
disconnectAll()
Disconnect from all hosts |
boolean |
disconnectHost(int connectionId)
disconnect one host specified with the connection ID |
int |
download(String remotePath,
String localPath,
String fileFilter,
String localNamingType)
|
PlanetLabHost[] |
getAllHosts()
|
PlanetLabHost[] |
getAvailableHosts()
|
String |
getCommand(int commandId)
returns the command string assiciated with the specified command id |
Map<Integer,Integer> |
getCommandExitStats(int commandIndex)
Sends a query for exitcode stats for executed commands |
int |
getCommandNum()
get the total number of commands queued and executed |
void |
getCoMonData()
|
double |
getCoMonProgress()
|
double |
getCompletionStats(int commandId)
queries for what ratio of hosts that have completed the command specified by command id |
Credentials |
getCredentials()
get the credentials used |
PlanetLabHost |
getHostInfo(int plcHostId)
|
PlanetLabHost |
getHostInfo(String hostname)
returns a PlanetLabHost with the same ip as the ip of the host specified by hostname. |
int |
getHostNum()
get the total number of hosts, including disconencted hosts |
PlanetLabHost[] |
getHostsNotInSlice()
|
PlanetLabHost |
getPlanetLabHost(int connectionId)
|
PlanetLabSite |
getPlanetLabSite(PlanetLabHost host)
|
SshConnection |
getSshConnection(int connectionId)
|
void |
handleFailedConnect(PlanetLabHost host)
|
int |
killCommand(int commandId)
|
int |
queueCommand(String command,
double timeout,
boolean stopOnError)
|
void |
shutdown()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConnectionController(Credentials cred)
Method Detail |
---|
public int addRandomHostsFromPLC(int num)
num
- number of hosts to add
public int addRandomSitesFromPLC(int num)
num
- number of hosts to add
public int connectToHost(PlanetLabHost host, String connectFailedPolicy)
host
- the fully qualified hostnameconnectFailedPolicy
- the policy to use if the connect fails
public void disconnectAll()
public boolean disconnectHost(int connectionId)
connectionId
- the id of the connection
public String getCommand(int commandId)
commandId
- the id of the command
public Map<Integer,Integer> getCommandExitStats(int commandIndex)
commandIndex
- the index of the command queried
public int getCommandNum()
public double getCompletionStats(int commandId)
commandId
- the command id
public Credentials getCredentials()
public PlanetLabHost getHostInfo(String hostname)
hostname
- The hostname of the host to query for, or the ip address in
quad dot format
public PlanetLabHost getHostInfo(int plcHostId)
public int getHostNum()
public PlanetLabHost getPlanetLabHost(int connectionId)
public void getCoMonData()
public double getCoMonProgress()
public PlanetLabSite getPlanetLabSite(PlanetLabHost host)
public PlanetLabHost[] getHostsNotInSlice()
public PlanetLabHost[] getAllHosts()
public PlanetLabHost[] getAvailableHosts()
public int addHostsToSlice(String[] hostnames)
public SshConnection getSshConnection(int connectionId)
public void handleFailedConnect(PlanetLabHost host)
public int queueCommand(String command, double timeout, boolean stopOnError)
public int killCommand(int commandId)
public void shutdown()
public int download(String remotePath, String localPath, String fileFilter, String localNamingType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |