com.xensource.xenapi
Class HostCpu

java.lang.Object
  extended by com.xensource.xenapi.XenAPIObject
      extended by com.xensource.xenapi.HostCpu

public class HostCpu
extends XenAPIObject

A physical CPU


Nested Class Summary
static class HostCpu.Record
          Represents all the fields in a HostCpu
 
Field Summary
protected  java.lang.String ref
          The XenAPI reference to this object.
 
Method Summary
 void addToOtherConfig(Connection c, java.lang.String key, java.lang.String value)
          Add the given key-value pair to the other_config field of the given host_cpu.
 boolean equals(java.lang.Object obj)
          If obj is a HostCpu, compares XenAPI references for equality.
static java.util.Set<HostCpu> getAll(Connection c)
          Deprecated.  
static java.util.Map<HostCpu,HostCpu.Record> getAllRecords(Connection c)
          Return a map of host_cpu references to host_cpu records for all host_cpus known to the system.
static HostCpu getByUuid(Connection c, java.lang.String uuid)
          Deprecated.  
 java.lang.Long getFamily(Connection c)
          Get the family field of the given host_cpu.
 java.lang.String getFeatures(Connection c)
          Get the features field of the given host_cpu.
 java.lang.String getFlags(Connection c)
          Get the flags field of the given host_cpu.
 Host getHost(Connection c)
          Get the host field of the given host_cpu.
 java.lang.Long getModel(Connection c)
          Get the model field of the given host_cpu.
 java.lang.String getModelname(Connection c)
          Get the modelname field of the given host_cpu.
 java.lang.Long getNumber(Connection c)
          Get the number field of the given host_cpu.
 java.util.Map<java.lang.String,java.lang.String> getOtherConfig(Connection c)
          Get the other_config field of the given host_cpu.
 HostCpu.Record getRecord(Connection c)
          Deprecated.  
 java.lang.Long getSpeed(Connection c)
          Get the speed field of the given host_cpu.
 java.lang.String getStepping(Connection c)
          Get the stepping field of the given host_cpu.
 java.lang.Double getUtilisation(Connection c)
          Get the utilisation field of the given host_cpu.
 java.lang.String getUuid(Connection c)
          Get the uuid field of the given host_cpu.
 java.lang.String getVendor(Connection c)
          Get the vendor field of the given host_cpu.
 int hashCode()
           
 void removeFromOtherConfig(Connection c, java.lang.String key)
          Remove the given key and its corresponding value from the other_config field of the given host_cpu.
 void setOtherConfig(Connection c, java.util.Map<java.lang.String,java.lang.String> otherConfig)
          Set the other_config field of the given host_cpu.
 java.lang.String toWireString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

protected final java.lang.String ref
The XenAPI reference to this object.

Method Detail

toWireString

public java.lang.String toWireString()
Specified by:
toWireString in class XenAPIObject

equals

public boolean equals(java.lang.Object obj)
If obj is a HostCpu, compares XenAPI references for equality.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getRecord

@Deprecated
public HostCpu.Record getRecord(Connection c)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException
Deprecated. 

Get a record containing the current state of the given host_cpu.

Returns:
all fields from the object
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getByUuid

@Deprecated
public static HostCpu getByUuid(Connection c,
                                           java.lang.String uuid)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException
Deprecated. 

Get a reference to the host_cpu instance with the specified UUID.

Parameters:
uuid - UUID of object to return
Returns:
reference to the object
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getUuid

public java.lang.String getUuid(Connection c)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException
Get the uuid field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getHost

public Host getHost(Connection c)
             throws Types.BadServerResponse,
                    Types.XenAPIException,
                    org.apache.xmlrpc.XmlRpcException
Get the host field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getNumber

public java.lang.Long getNumber(Connection c)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException
Get the number field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getVendor

public java.lang.String getVendor(Connection c)
                           throws Types.BadServerResponse,
                                  Types.XenAPIException,
                                  org.apache.xmlrpc.XmlRpcException
Get the vendor field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getSpeed

public java.lang.Long getSpeed(Connection c)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException
Get the speed field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getModelname

public java.lang.String getModelname(Connection c)
                              throws Types.BadServerResponse,
                                     Types.XenAPIException,
                                     org.apache.xmlrpc.XmlRpcException
Get the modelname field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getFamily

public java.lang.Long getFamily(Connection c)
                         throws Types.BadServerResponse,
                                Types.XenAPIException,
                                org.apache.xmlrpc.XmlRpcException
Get the family field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getModel

public java.lang.Long getModel(Connection c)
                        throws Types.BadServerResponse,
                               Types.XenAPIException,
                               org.apache.xmlrpc.XmlRpcException
Get the model field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getStepping

public java.lang.String getStepping(Connection c)
                             throws Types.BadServerResponse,
                                    Types.XenAPIException,
                                    org.apache.xmlrpc.XmlRpcException
Get the stepping field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getFlags

public java.lang.String getFlags(Connection c)
                          throws Types.BadServerResponse,
                                 Types.XenAPIException,
                                 org.apache.xmlrpc.XmlRpcException
Get the flags field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getFeatures

public java.lang.String getFeatures(Connection c)
                             throws Types.BadServerResponse,
                                    Types.XenAPIException,
                                    org.apache.xmlrpc.XmlRpcException
Get the features field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getUtilisation

public java.lang.Double getUtilisation(Connection c)
                                throws Types.BadServerResponse,
                                       Types.XenAPIException,
                                       org.apache.xmlrpc.XmlRpcException
Get the utilisation field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getOtherConfig

public java.util.Map<java.lang.String,java.lang.String> getOtherConfig(Connection c)
                                                                throws Types.BadServerResponse,
                                                                       Types.XenAPIException,
                                                                       org.apache.xmlrpc.XmlRpcException
Get the other_config field of the given host_cpu.

Returns:
value of the field
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

setOtherConfig

public void setOtherConfig(Connection c,
                           java.util.Map<java.lang.String,java.lang.String> otherConfig)
                    throws Types.BadServerResponse,
                           Types.XenAPIException,
                           org.apache.xmlrpc.XmlRpcException
Set the other_config field of the given host_cpu.

Parameters:
otherConfig - New value to set
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

addToOtherConfig

public void addToOtherConfig(Connection c,
                             java.lang.String key,
                             java.lang.String value)
                      throws Types.BadServerResponse,
                             Types.XenAPIException,
                             org.apache.xmlrpc.XmlRpcException
Add the given key-value pair to the other_config field of the given host_cpu.

Parameters:
key - Key to add
value - Value to add
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

removeFromOtherConfig

public void removeFromOtherConfig(Connection c,
                                  java.lang.String key)
                           throws Types.BadServerResponse,
                                  Types.XenAPIException,
                                  org.apache.xmlrpc.XmlRpcException
Remove the given key and its corresponding value from the other_config field of the given host_cpu. If the key is not in that Map, then do nothing.

Parameters:
key - Key to remove
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getAll

@Deprecated
public static java.util.Set<HostCpu> getAll(Connection c)
                                     throws Types.BadServerResponse,
                                            Types.XenAPIException,
                                            org.apache.xmlrpc.XmlRpcException
Deprecated. 

Return a list of all the host_cpus known to the system.

Returns:
references to all objects
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException

getAllRecords

public static java.util.Map<HostCpu,HostCpu.Record> getAllRecords(Connection c)
                                                           throws Types.BadServerResponse,
                                                                  Types.XenAPIException,
                                                                  org.apache.xmlrpc.XmlRpcException
Return a map of host_cpu references to host_cpu records for all host_cpus known to the system.

Returns:
records of all objects
Throws:
Types.BadServerResponse
Types.XenAPIException
org.apache.xmlrpc.XmlRpcException