com.xensource.xenapi
Class VMMetrics

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

public class VMMetrics
extends Object

The metrics associated with a VM


Nested Class Summary
static class VMMetrics.Record
          Represents all the fields in a VMMetrics
 
Field Summary
protected  String ref
          The XenAPI reference to this object.
 
Method Summary
static Set<VMMetrics> getAll()
          Return a list of all the VM_metrics instances known to the system.
static Map<VMMetrics,VMMetrics.Record> getAllRecords()
          Get all the VMMetrics Records at once, in a single XML RPC call
static VMMetrics getByUuid(String uuid)
          Get a reference to the VM_metrics instance with the specified UUID.
protected static VMMetrics getInstFromRef(String ref)
           
 Date getLastUpdated()
          Get the last_updated field of the given VM_metrics.
 Long getMemoryActual()
          Get the memory/actual field of the given VM_metrics.
 VMMetrics.Record getRecord()
          Get a record containing the current state of the given VM_metrics.
 Date getStartTime()
          Get the start_time field of the given VM_metrics.
 Set<String> getState()
          Get the state field of the given VM_metrics.
 String getUuid()
          Get the uuid field of the given VM_metrics.
 Map<Long,Long> getVCPUsCPU()
          Get the VCPUs/CPU field of the given VM_metrics.
 Map<Long,Set<String>> getVCPUsFlags()
          Get the VCPUs/flags field of the given VM_metrics.
 Long getVCPUsNumber()
          Get the VCPUs/number field of the given VM_metrics.
 Map<String,String> getVCPUsParams()
          Get the VCPUs/params field of the given VM_metrics.
 Map<Long,Double> getVCPUsUtilisation()
          Get the VCPUs/utilisation field of the given VM_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 VMMetrics getInstFromRef(String ref)

getRecord

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

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

getByUuid

public static VMMetrics getByUuid(String uuid)
                           throws Types.BadServerResponse,
                                  ConnectionHelper.NoConnectionOnThisThreadException,
                                  XmlRpcException
Get a reference to the VM_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 VM_metrics.

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

getMemoryActual

public Long getMemoryActual()
                     throws Types.BadServerResponse,
                            ConnectionHelper.NoConnectionOnThisThreadException,
                            XmlRpcException
Get the memory/actual field of the given VM_metrics.

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

getVCPUsNumber

public Long getVCPUsNumber()
                    throws Types.BadServerResponse,
                           ConnectionHelper.NoConnectionOnThisThreadException,
                           XmlRpcException
Get the VCPUs/number field of the given VM_metrics.

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

getVCPUsUtilisation

public Map<Long,Double> getVCPUsUtilisation()
                                     throws Types.BadServerResponse,
                                            ConnectionHelper.NoConnectionOnThisThreadException,
                                            XmlRpcException
Get the VCPUs/utilisation field of the given VM_metrics.

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

getVCPUsCPU

public Map<Long,Long> getVCPUsCPU()
                           throws Types.BadServerResponse,
                                  ConnectionHelper.NoConnectionOnThisThreadException,
                                  XmlRpcException
Get the VCPUs/CPU field of the given VM_metrics.

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

getVCPUsParams

public Map<String,String> getVCPUsParams()
                                  throws Types.BadServerResponse,
                                         ConnectionHelper.NoConnectionOnThisThreadException,
                                         XmlRpcException
Get the VCPUs/params field of the given VM_metrics.

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

getVCPUsFlags

public Map<Long,Set<String>> getVCPUsFlags()
                                    throws Types.BadServerResponse,
                                           ConnectionHelper.NoConnectionOnThisThreadException,
                                           XmlRpcException
Get the VCPUs/flags field of the given VM_metrics.

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

getState

public Set<String> getState()
                     throws Types.BadServerResponse,
                            ConnectionHelper.NoConnectionOnThisThreadException,
                            XmlRpcException
Get the state field of the given VM_metrics.

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

getStartTime

public Date getStartTime()
                  throws Types.BadServerResponse,
                         ConnectionHelper.NoConnectionOnThisThreadException,
                         XmlRpcException
Get the start_time field of the given VM_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 VM_metrics.

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

getAll

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

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

getAllRecords

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

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