|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.faban.harness.common.HostRoles
public class HostRoles
The HostRoles class maintains the role - host - alias relationship.
Constructor Summary | |
---|---|
HostRoles(ParamRepository par)
Constructs the HostRoles at benchmark run time from the benchmark parameter file and run information. |
|
HostRoles(String fileName)
Constructs the HostRoles after the benchmark run time. |
Method Summary | |
---|---|
String[] |
getAliasesByHost(String host)
Obtains all aliases or interface names used to refer to the host. |
String[] |
getAliasesByHostAndRole(String host,
String role)
Obtains the aliases that are used for a certain host in a certain function. |
String[] |
getAliasesByRole(String role)
Obtains the host aliases used for a certain role or function in the benchmark run. |
String |
getHostByAlias(String alias)
Obtains the real host name referred to by an alias. |
String[] |
getHostsByRole(String role)
Obtains the hosts pertaining to a certain role or function in the benchmark run. |
String[] |
getHostsInOrder()
Returns the list of hosts in the run in the order their aliases are referred to in the configuration file. |
String[] |
getRolesByAlias(String alias)
Obtains the roles or function an interface or alias is used for. |
String[] |
getRolesByHost(String host)
Obtains the function roles the host in question is used for. |
void |
write(Appendable b)
Writes the HostRoles out to an appendable for later reading. |
void |
write(String fileName)
Writes the HostRoles out to file for later reading. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HostRoles(ParamRepository par) throws ConfigurationException
par
- The parameter repository/file
ConfigurationException
- If there is a configuration errorpublic HostRoles(String fileName) throws IOException
fileName
- The file containing the stored HostRoles configuration
IOException
- Error reading the file or invalid file formatMethod Detail |
---|
public void write(String fileName) throws IOException
fileName
- The file name to store the information
IOException
- A write error occurredpublic void write(Appendable b) throws IOException
b
- The appendable buffer.
IOException
- A write error occurredpublic String[] getHostsInOrder()
public String[] getHostsByRole(String role)
role
- The role name.
public String[] getAliasesByRole(String role)
role
- The role name.
public String[] getRolesByHost(String host)
host
- The host name
public String[] getAliasesByHost(String host)
host
- The host name
public String[] getAliasesByHostAndRole(String host, String role)
host
- The host namerole
- The role name
public String getHostByAlias(String alias)
alias
- The alias name
public String[] getRolesByAlias(String alias)
alias
- The alias name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |