Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ow2.jasmine.vmm.api
Interface HostMXBean

All Superinterfaces:
  ManagedResourceMXBean

    public interface HostMXBean

extends ManagedResourceMXBean

Management interface of a physical host acting as a container of virtual machines by way of a hypervisor.

The `ObjectName` for identifying a HostMXBean follows the following template:

> org.ow2.jasmine.vmm.api:type=Host,name=<pathname> ,hostname=<hostname>

The notifications that can be emitted by a HostMXBean are as follows

- NotificationTypes.VM_NEW when a new VM is created
- NotificationTypes.VM_DEL when a VM is deleted
- NotificationTypes.PERF_REPORT: periodic performance reports
- NotificationTypes.HYPERVISOR_CONNECTION_STATE: when connection to host hypervisor is established or lost

Nested Class Summary
`static class` | `HostMXBean.HostPowerState` Different states of a host.
`static class` | `HostMXBean.PerfMetric` Defines the different performance metrics that can be retrieved from a host

Method Summary
`void` | `configurePerfMonitor(java.util.Set<HostMXBean.PerfMetric> metricsOfInterest, long periodMillis)` Deprecated.
`VirtualMachineMXBean` | `createVM(VMConfigSpec vmSpec, boolean sync)` Creates a new virtual machine on this host.
`java.util.Map<java.lang.String,java.lang.String>` | `getAttributes()` Returns the attributes of the host
`java.util.Map<java.lang.String,java.lang.String>` | `getCPUInfo()` Returns the information about the CPU on this host.
`float` | `getCPULoad()` Returns the aggregate CPU load of the host
`long` | `getFreeMemoryMB()` Returns the free memory capacity of this host in MBytes
`java.lang.String` | `getHostName()` Returns the DNS name of the host
`HostMXBean.HostPowerState` | `getHostState()` Returns the power state of the host
`java.util.Map<java.lang.String,java.lang.String>` | `getHypervisorInfo()` Returns properties of the hypervisor active for this host
`float[]` | `getLoadPerCPU()` Returns the current load on each CPU core of the host
`int` | `getNumCPU()` Return the number of CPU cores on the host
`java.util.List<VirtualMachineMXBean>` | `getResidentVMs()` Returns the VMs resident on this host
`ServerPoolMXBean` | `getServerPool()` Returns the server pool this host belongs to
`long` | `getTotalMemoryMB()` Returns the total memory capacity of this host in MBytes
`java.util.Map<java.lang.String,java.lang.Float>` | `getVMCPULoads()` Return the CPU load of every VM hosted on this host
`VirtualMachineImageStoreMXBean` | `getVMImageStore()` Returns the VM image store associated with this host
`java.util.Map<java.lang.String,ResourceUsage>` | `getVMResourceUsage()` Returns the current resource usage (CPU, memory, network, disk I/O) for all VM residing on this host
`boolean` | `isConnectionLost()` Returns true if the connection to the underlying driver-specific hypervisor on the physical host is lost.
`void` | `start()` start the host
`void` | `stop()` shutdown the host

Methods inherited from interface org.ow2.jasmine.vmm.api.ManagedResourceMXBean
`getObjectName, getPath`

Method Detail

### isConnectionLost

    boolean isConnectionLost()

  Returns true if the connection to the underlying driver-specific hypervisor on the physical host is lost.

  Returns:
    true if the connection to the host hypervisor is lost

### getServerPool

    ServerPoolMXBean getServerPool()

  Returns the server pool this host belongs to

  Returns:

### getAttributes

    java.util.Map<java.lang.String,java.lang.String> getAttributes()

  Returns the attributes of the host

  Returns:

### getHostName

    java.lang.String getHostName()
                                 throws VMMException

  Returns the DNS name of the host

  Returns:
  Throws:
    `VMMException`

### getHypervisorInfo

    java.util.Map<java.lang.String,java.lang.String> getHypervisorInfo()
                                                                       throws VMMException

  Returns properties of the hypervisor active for this host

  Returns:
  Throws:
    `VMMException`

### getNumCPU

    int getNumCPU()
                  throws VMMException

  Return the number of CPU cores on the host

  Returns:
  Throws:
    `VMMException`

### getCPUInfo

    java.util.Map<java.lang.String,java.lang.String> getCPUInfo()
                                                                throws VMMException

  Returns the information about the CPU on this host. The following properties are returned: model, speed and vendor.

  Returns:
  Throws:
    `VMMException`

### getResidentVMs

    java.util.List<VirtualMachineMXBean> getResidentVMs()
                                                        throws VMMException

  Returns the VMs resident on this host

  Returns:
  Throws:
    `VMMException`

### getTotalMemoryMB

    long getTotalMemoryMB()
                          throws VMMException

  Returns the total memory capacity of this host in MBytes

  Returns:
  Throws:
    `VMMException`

### getFreeMemoryMB

    long getFreeMemoryMB()
                         throws VMMException

  Returns the free memory capacity of this host in MBytes

  Returns:
  Throws:
    `VMMException`

### getLoadPerCPU

    float[] getLoadPerCPU()
                          throws VMMException

  Returns the current load on each CPU core of the host

  Returns:
  Throws:
    `VMMException`

### getCPULoad

    float getCPULoad()
                     throws VMMException

  Returns the aggregate CPU load of the host

  Returns:
  Throws:
    `VMMException`

### getHostState

    HostMXBean.HostPowerState getHostState()
                                           throws VMMException

  Returns the power state of the host

  Returns:
    current power state
  Throws:
    `javax.management.InstanceNotFoundException` - thrown if the specified MXBean does not exist
    `VMMException`

### getVMCPULoads

    java.util.Map<java.lang.String,java.lang.Float> getVMCPULoads()
                                                                  throws VMMException

  Return the CPU load of every VM hosted on this host

  Returns:
    a map of CPU loads, as percentages, keyed by VM labels
  Throws:
    `VMMException`

### createVM

    VirtualMachineMXBean createVM(VMConfigSpec vmSpec,
                                  boolean sync)
                                  throws InsufficientResourcesException,
                                         InvalidVMConfigException,
                                         VMMException

  Creates a new virtual machine on this host. Upon successful creation a notification of type NotificationTypes.VM_NEW will be emitted by the HostMXBean on which the VM has been created.

  Parameters:
    `vmSpec` - initial configuration of the virtual machine
    `sync` - if true the call will return once the VM has been created
  Returns:
    the management interface of the created VM if `sync` is true, null otherwise
  Throws:
    `InsufficientResourcesException` - raised if not enough resources are available to create the VM
    `InvalidVMConfigException` - raised if the VM configuration is invalid
    `VMMException`

### stop

    void stop()
              throws VMMException

  shutdown the host

  Throws:
    `VMMException`

### start

    void start()
               throws VMMException

  start the host

  Throws:
    `VMMException`

### getVMImageStore

    VirtualMachineImageStoreMXBean getVMImageStore()
                                                   throws VMMException

  Returns the VM image store associated with this host

  Returns:
  Throws:
    `VMMException`

### getVMResourceUsage

    java.util.Map<java.lang.String,ResourceUsage> getVMResourceUsage()
                                                                     throws VMMException

  Returns the current resource usage (CPU, memory, network, disk I/O) for all VM residing on this host

  Returns:
    a map of ResourceUsage keyed by the VM label
  Throws:
    `VMMException`

### configurePerfMonitor

    @Deprecated
    void configurePerfMonitor(java.util.Set<HostMXBean.PerfMetric> metricsOfInterest,
                                         long periodMillis)
                              throws VMMException

  Deprecated.

  Configure the reporting of performance metrics as JMX notifications.

  Parameters:
    `metricsOfInterest` - defines the metrics of interest
    `periodMillis` - the period of reporting in milliseconds. If this value is equal or less than zero, the reporting is disabled
  Throws:
    `VMMException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 OW2 Consortium. All Rights Reserved.