com.sun.grid.jgdi.monitoring
public class HostInfoImpl extends java.lang.Object implements HostInfo, java.io.Serializable
Constructor and Description |
---|
HostInfoImpl()
Create a new host info object
|
HostInfoImpl(java.lang.String hostname)
Create a new host info object
|
Modifier and Type | Method and Description |
---|---|
void |
addJob(JobInfo job)
Add a job to the job list:
|
void |
addQueue(QueueInfo queue)
Add a QueueInfo object to the queue list:
|
java.lang.String |
getArch()
Get the architecture of the host
|
java.util.Set<java.lang.String> |
getDominanceSet()
Get the set of available domincances
|
java.lang.String |
getHostname()
Get the hostname
|
java.lang.Object |
getHostValue(java.lang.String name)
Get a host value
|
int |
getHostValueCount()
Get the number of host values
|
java.util.Set<java.lang.String> |
getHostValueKeys()
Get the set of host value names
|
int |
getJobCount()
Get the number of entries in the job list
|
java.util.List<JobInfo> |
getJobList()
Get the list of jobs which are running on the host
|
java.lang.String |
getLoadAvg()
Get the load average of the host
|
java.lang.String |
getMemTotal()
Get the total memory of the host
|
java.lang.String |
getMemUsed()
Get the used memory of the host
|
java.lang.String |
getNumberOfProcessors()
Get the number of processors of the host
|
int |
getQueueCount()
Get the number of entries in the queue list
|
java.util.List<QueueInfo> |
getQueueList()
Get the list of queues which are available on the host
|
java.lang.Object |
getResourceValue(java.lang.String dominance,
java.lang.String name)
Get a resource value of the host
|
java.util.Set<java.lang.String> |
getResourceValueNames(java.lang.String dominance)
Get the set of resource names for a dominance
|
java.lang.String |
getSwapTotal()
Get the size of the swap of the host
|
java.lang.String |
getSwapUsed()
Get the size of used swap space
|
void |
putHostValue(java.lang.String name,
java.lang.Object value)
Add a host value
|
void |
putResourceValue(java.lang.String dominance,
java.lang.String name,
java.lang.Object value)
add a new resoruce value
|
void |
removeAllHostValue()
remove all host value
|
void |
removeHostValue(java.lang.String name)
remove a host value
|
void |
setHostname(java.lang.String hostname)
Set the hostname
|
public HostInfoImpl()
public HostInfoImpl(java.lang.String hostname)
hostname
- name of the hostpublic java.lang.Object getHostValue(java.lang.String name)
getHostValue
in interface HostInfo
name
- name of the host valuenull
public java.lang.String getArch()
public java.lang.String getNumberOfProcessors()
getNumberOfProcessors
in interface HostInfo
public java.lang.String getLoadAvg()
getLoadAvg
in interface HostInfo
public java.lang.String getMemTotal()
getMemTotal
in interface HostInfo
public java.lang.String getMemUsed()
getMemUsed
in interface HostInfo
public java.lang.String getSwapTotal()
getSwapTotal
in interface HostInfo
public java.lang.String getSwapUsed()
getSwapUsed
in interface HostInfo
public int getHostValueCount()
getHostValueCount
in interface HostInfo
public void putHostValue(java.lang.String name, java.lang.Object value)
name
- name of the host valuevalue
- valuepublic java.util.Set<java.lang.String> getHostValueKeys()
getHostValueKeys
in interface HostInfo
public void removeHostValue(java.lang.String name)
name
- name of the host valuepublic void removeAllHostValue()
public java.lang.Object getResourceValue(java.lang.String dominance, java.lang.String name)
getResourceValue
in interface HostInfo
dominance
- dominace of the resource valuename
- name of the resourcepublic void putResourceValue(java.lang.String dominance, java.lang.String name, java.lang.Object value)
dominance
- dominance of the resource valuename
- name of the resourcevalue
- valuepublic java.util.Set<java.lang.String> getDominanceSet()
getDominanceSet
in interface HostInfo
public java.util.Set<java.lang.String> getResourceValueNames(java.lang.String dominance)
getResourceValueNames
in interface HostInfo
dominance
- the dominancepublic java.lang.String getHostname()
getHostname
in interface HostInfo
public void setHostname(java.lang.String hostname)
hostname
- the hostnamepublic java.util.List<JobInfo> getJobList()
Note: The job list is only set if the
QHostOptions.includeJobs
flag is set.
getJobList
in interface HostInfo
JobInfo
)JGDIBase.execQHost(com.sun.grid.jgdi.monitoring.QHostOptions)
public int getJobCount()
getJobCount
in interface HostInfo
public void addJob(JobInfo job)
job
- the job info objectpublic java.util.List<QueueInfo> getQueueList()
Note: The queue list is only set if the
QHostOptions.includeQueue
flag is set.
getQueueList
in interface HostInfo
QueueInfo
)JGDIBase.execQHost(com.sun.grid.jgdi.monitoring.QHostOptions)
public int getQueueCount()
getQueueCount
in interface HostInfo
public void addQueue(QueueInfo queue)
queue
- the queue info objectCopyright © 2007 Sun Microsystems, Inc. All rights reserved.