public class HostRoles extends Object
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public HostRoles(ParamRepository par) throws ConfigurationException
par
- The parameter repository/fileConfigurationException
- If there is a configuration errorpublic HostRoles(String fileName) throws IOException
fileName
- The file containing the stored HostRoles configurationIOException
- Error reading the file or invalid file formatpublic void write(String fileName) throws IOException
fileName
- The file name to store the informationIOException
- 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 namepublic String[] getAliasesByHost(String host)
host
- The host namepublic String[] getAliasesByHostAndRole(String host, String role)
host
- The host namerole
- The role namepublic String getHostByAlias(String alias)
alias
- The alias name