com.sun.grid.jgdi.monitoring

## Class HostInfoImpl

- java.lang.Object
- - com.sun.grid.jgdi.monitoring.HostInfoImpl

- All Implemented Interfaces:
    HostInfo, java.io.Serializable

      public class HostInfoImpl
      extends java.lang.Object
      implements HostInfo, java.io.Serializable

  Objects of this class holds the monitoring information about a cluster host.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HostInfoImpl()` Create a new host info object
    `HostInfoImpl(java.lang.String hostname)` Create a new host info object

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HostInfoImpl

          public HostInfoImpl()

      Create a new host info object

    - #### HostInfoImpl

          public HostInfoImpl(java.lang.String hostname)

      Create a new host info object
      Parameters:
        `hostname` - name of the host

  - ### Method Detail

    - #### getHostValue

          public java.lang.Object getHostValue(java.lang.String name)

      Get a host value
      Specified by:
        `getHostValue` in interface `HostInfo`
      Parameters:
        `name` - name of the host value
      Returns:
        the host value or `null`

    - #### getArch

          public java.lang.String getArch()

      Get the architecture of the host
      Specified by:
        `getArch` in interface `HostInfo`
      Returns:
        the architecture of the host

    - #### getNumberOfProcessors

          public java.lang.String getNumberOfProcessors()

      Get the number of processors of the host
      Specified by:
        `getNumberOfProcessors` in interface `HostInfo`
      Returns:
        number of processors of the host

    - #### getLoadAvg

          public java.lang.String getLoadAvg()

      Get the load average of the host
      Specified by:
        `getLoadAvg` in interface `HostInfo`
      Returns:
        the load average of the host

    - #### getMemTotal

          public java.lang.String getMemTotal()

      Get the total memory of the host
      Specified by:
        `getMemTotal` in interface `HostInfo`
      Returns:
        total memory of the host

    - #### getMemUsed

          public java.lang.String getMemUsed()

      Get the used memory of the host
      Specified by:
        `getMemUsed` in interface `HostInfo`
      Returns:
        the used memory

    - #### getSwapTotal

          public java.lang.String getSwapTotal()

      Get the size of the swap of the host
      Specified by:
        `getSwapTotal` in interface `HostInfo`
      Returns:
        size of the swap of the host

    - #### getSwapUsed

          public java.lang.String getSwapUsed()

      Get the size of used swap space
      Specified by:
        `getSwapUsed` in interface `HostInfo`
      Returns:
        size of the used swap space

    - #### getHostValueCount

          public int getHostValueCount()

      Get the number of host values
      Specified by:
        `getHostValueCount` in interface `HostInfo`
      Returns:
        number of host values

    - #### putHostValue

          public void putHostValue(java.lang.String name,
                                   java.lang.Object value)

      Add a host value
      Parameters:
        `name` - name of the host value
        `value` - value

    - #### getHostValueKeys

          public java.util.Set<java.lang.String> getHostValueKeys()

      Get the set of host value names
      Specified by:
        `getHostValueKeys` in interface `HostInfo`
      Returns:
        set of host value names

    - #### removeHostValue

          public void removeHostValue(java.lang.String name)

      remove a host value
      Parameters:
        `name` - name of the host value

    - #### removeAllHostValue

          public void removeAllHostValue()

      remove all host value

    - #### getResourceValue

          public java.lang.Object getResourceValue(java.lang.String dominance,
                                                   java.lang.String name)

      Get a resource value of the host
      Specified by:
        `getResourceValue` in interface `HostInfo`
      Parameters:
        `dominance` - dominace of the resource value
        `name` - name of the resource
      Returns:
        the resource value

    - #### putResourceValue

          public void putResourceValue(java.lang.String dominance,
                                       java.lang.String name,
                                       java.lang.Object value)

      add a new resoruce value
      Parameters:
        `dominance` - dominance of the resource value
        `name` - name of the resource
        `value` - value

    - #### getDominanceSet

          public java.util.Set<java.lang.String> getDominanceSet()

      Get the set of available domincances
      Specified by:
        `getDominanceSet` in interface `HostInfo`
      Returns:
        the set of available domincances

    - #### getResourceValueNames

          public java.util.Set<java.lang.String> getResourceValueNames(java.lang.String dominance)

      Get the set of resource names for a dominance
      Specified by:
        `getResourceValueNames` in interface `HostInfo`
      Parameters:
        `dominance` - the dominance
      Returns:
        set of resource names

    - #### getHostname

          public java.lang.String getHostname()

      Get the hostname
      Specified by:
        `getHostname` in interface `HostInfo`
      Returns:
        the hostname

    - #### setHostname

          public void setHostname(java.lang.String hostname)

      Set the hostname
      Parameters:
        `hostname` - the hostname

    - #### getJobList

          public java.util.List<JobInfo> getJobList()

      Get the list of jobs which are running on the host

      Note: The job list is only set if the `QHostOptions.includeJobs` flag is set.

      Specified by:
        `getJobList` in interface `HostInfo`
      Returns:
        list of jobs (instances of `JobInfo`)
      See Also:
        `JGDIBase.execQHost(com.sun.grid.jgdi.monitoring.QHostOptions)`

    - #### getJobCount

          public int getJobCount()

      Get the number of entries in the job list
      Specified by:
        `getJobCount` in interface `HostInfo`
      Returns:
        the number of entries in the job list

    - #### addJob

          public void addJob(JobInfo job)

      Add a job to the job list:
      Parameters:
        `job` - the job info object

    - #### getQueueList

          public java.util.List<QueueInfo> getQueueList()

      Get the list of queues which are available on the host

      Note: The queue list is only set if the `QHostOptions.includeQueue` flag is set.

      Specified by:
        `getQueueList` in interface `HostInfo`
      Returns:
        list of queues (instances of `QueueInfo`)
      See Also:
        `JGDIBase.execQHost(com.sun.grid.jgdi.monitoring.QHostOptions)`

    - #### getQueueCount

          public int getQueueCount()

      Get the number of entries in the queue list
      Specified by:
        `getQueueCount` in interface `HostInfo`
      Returns:
        the number of entries in the queue list

    - #### addQueue

          public void addQueue(QueueInfo queue)

      Add a QueueInfo object to the queue list:
      Parameters:
        `queue` - the queue info object

Copyright © 2007 Sun Microsystems, Inc. All rights reserved.