com.xensource.xenapi
Class HostMetrics

java.lang.Object
  extended by com.xensource.xenapi.HostMetrics

public class HostMetrics
extends Object

The metrics associated with a host


Nested Class Summary
static class HostMetrics.Record
          Represents all the fields in a HostMetrics
 
Field Summary
protected  String ref
          The XenAPI reference to this object.
 
Method Summary
static Set<HostMetrics> getAll()
          Return a list of all the host_metrics instances known to the system.
static Map<HostMetrics,HostMetrics.Record> getAllRecords()
          Get all the HostMetrics Records at once, in a single XML RPC call
static HostMetrics getByUuid(String uuid)
          Get a reference to the host_metrics instance with the specified UUID.
protected static HostMetrics getInstFromRef(String ref)
           
 Date getLastUpdated()
          Get the last_updated field of the given host_metrics.
 Long getMemoryFree()
          Get the memory/free field of the given host_metrics.
 Long getMemoryTotal()
          Get the memory/total field of the given host_metrics.
 HostMetrics.Record getRecord()
          Get a record containing the current state of the given host_metrics.
 String getUuid()
          Get the uuid field of the given host_metrics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

protected final String ref
The XenAPI reference to this object.

Method Detail

getInstFromRef

protected static HostMetrics getInstFromRef(String ref)

getRecord

public HostMetrics.Record getRecord()
                             throws Types.BadServerResponse,
                                    ConnectionHelper.NoConnectionOnThisThreadException,
                                    XmlRpcException
Get a record containing the current state of the given host_metrics.

Returns:
all fields from the object
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getByUuid

public static HostMetrics getByUuid(String uuid)
                             throws Types.BadServerResponse,
                                    ConnectionHelper.NoConnectionOnThisThreadException,
                                    XmlRpcException
Get a reference to the host_metrics instance with the specified UUID.

Parameters:
uuid - UUID of object to return
Returns:
reference to the object
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getUuid

public String getUuid()
               throws Types.BadServerResponse,
                      ConnectionHelper.NoConnectionOnThisThreadException,
                      XmlRpcException
Get the uuid field of the given host_metrics.

Returns:
value of the field
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getMemoryTotal

public Long getMemoryTotal()
                    throws Types.BadServerResponse,
                           ConnectionHelper.NoConnectionOnThisThreadException,
                           XmlRpcException
Get the memory/total field of the given host_metrics.

Returns:
value of the field
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getMemoryFree

public Long getMemoryFree()
                   throws Types.BadServerResponse,
                          ConnectionHelper.NoConnectionOnThisThreadException,
                          XmlRpcException
Get the memory/free field of the given host_metrics.

Returns:
value of the field
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getLastUpdated

public Date getLastUpdated()
                    throws Types.BadServerResponse,
                           ConnectionHelper.NoConnectionOnThisThreadException,
                           XmlRpcException
Get the last_updated field of the given host_metrics.

Returns:
value of the field
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getAll

public static Set<HostMetrics> getAll()
                               throws Types.BadServerResponse,
                                      ConnectionHelper.NoConnectionOnThisThreadException,
                                      XmlRpcException
Return a list of all the host_metrics instances known to the system.

Returns:
references to all objects
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException

getAllRecords

public static Map<HostMetrics,HostMetrics.Record> getAllRecords()
                                                         throws Types.BadServerResponse,
                                                                ConnectionHelper.NoConnectionOnThisThreadException,
                                                                XmlRpcException
Get all the HostMetrics Records at once, in a single XML RPC call

Returns:
A map from HostMetrics to HostMetrics.Record
Throws:
Types.BadServerResponse
ConnectionHelper.NoConnectionOnThisThreadException
XmlRpcException