com.redhat.rhn.domain.server
Class VirtualInstanceInfo

java.lang.Object
  extended by com.redhat.rhn.domain.BaseDomainHelper
      extended by com.redhat.rhn.domain.server.VirtualInstanceInfo

public class VirtualInstanceInfo
extends BaseDomainHelper

VirtualInstanceInfo


Constructor Summary
VirtualInstanceInfo()
           
 
Method Summary
 boolean equals(java.lang.Object object)
          Two VirtualInstanceInfo objects are considered equal if they share the same parent virtual instance.
 java.lang.String getName()
          Return the name of the virtual instance.
 java.lang.Integer getNumberOfCPUs()
          Returns the number of virtual CPUs allocated to the virtual instance.
 VirtualInstance getParent()
           
 VirtualInstanceState getState()
          Return the state of the virtual instance, which wil be running, stopped, crashed, or paused.
 java.lang.Long getTotalMemory()
          Returns the total memory in KB allocated to the virtual instance.
 VirtualInstanceType getType()
          Returns the virtualizations type of the virtual instance, which will be either Fully Virtualized or Para-Virtualized.
 int hashCode()
          
 void setName(java.lang.String newName)
          Sets the name of the virtual instance.
 void setNumberOfCPUs(java.lang.Integer cpuCount)
          Sets the number of virtual CPUs allocated to the virtual instance.
 void setState(VirtualInstanceState newState)
          Changes the state of the virtual instance.
 void setTotalMemory(java.lang.Long memory)
          Sets the total memory in KB for the virtual instance.
 void setType(VirtualInstanceType virtType)
          Sets the virtualization type of the virtual instance.
 
Methods inherited from class com.redhat.rhn.domain.BaseDomainHelper
getCreated, getModified, setCreated, setModified
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualInstanceInfo

public VirtualInstanceInfo()
Method Detail

getParent

public VirtualInstance getParent()
Returns:
the virtual instance owning this info

getName

public java.lang.String getName()
Return the name of the virtual instance.

Returns:
The name of the virtual instance.

setName

public void setName(java.lang.String newName)
Sets the name of the virtual instance.

Parameters:
newName - The new name

getTotalMemory

public java.lang.Long getTotalMemory()
Returns the total memory in KB allocated to the virtual instance.

Returns:
The total memory in KB allocated to the virtual instance.

setTotalMemory

public void setTotalMemory(java.lang.Long memory)
Sets the total memory in KB for the virtual instance.

Parameters:
memory - The total memory in KB.

getNumberOfCPUs

public java.lang.Integer getNumberOfCPUs()
Returns the number of virtual CPUs allocated to the virtual instance.

Returns:
The number of virtual CPUs allocated to the virtual instance.

setNumberOfCPUs

public void setNumberOfCPUs(java.lang.Integer cpuCount)
Sets the number of virtual CPUs allocated to the virtual instance.

Parameters:
cpuCount - The number of virtual CPUs allocated to the virtual instance.

getType

public VirtualInstanceType getType()
Returns the virtualizations type of the virtual instance, which will be either Fully Virtualized or Para-Virtualized.

Returns:
The type of virtualization type of the virtual instance, which will be either Fully Virtualized or Para-Virtualized.

setType

public void setType(VirtualInstanceType virtType)
Sets the virtualization type of the virtual instance.

Parameters:
virtType - The virtualization type

getState

public VirtualInstanceState getState()
Return the state of the virtual instance, which wil be running, stopped, crashed, or paused.

Returns:
The state of the virtual instance, which wil be running, stopped, crashed, or paused.

setState

public void setState(VirtualInstanceState newState)
Changes the state of the virtual instance.

Parameters:
newState - The new state, which is one of running, stopped, crashed, or paused.

equals

public boolean equals(java.lang.Object object)
Two VirtualInstanceInfo objects are considered equal if they share the same parent virtual instance.

Overrides:
equals in class java.lang.Object
Parameters:
object - The object to compare
Returns:
true if object is a VirtualInstanceInfo and has the same parent VirtualInstance as this info object.

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object