|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.redhat.rhn.domain.BaseDomainHelper
com.redhat.rhn.domain.server.VirtualInstance
public class VirtualInstance
VirtualInstance represents a virtual guest system. When the guest is
registered, there is an associated Server that contains additional
information about the guest.
This class maps to the RHN.RhnVirtualInstance table. The schema for the
RhnVirtualInstance supports guests of guests; however guests of guests is not
being implemented in the RHN 500 release.
| Constructor Summary | |
|---|---|
|
VirtualInstance()
Default constructor |
protected |
VirtualInstance(java.lang.Long instanceId)
This constructor is for testing only. |
| Method Summary | |
|---|---|
GuestAndNonVirtHostView |
asGuestAndNonVirtHostView()
An adapter method that transforms the virtual instance into a view. |
void |
deleteGuestSystem()
Deletes the guest server when the virtual instance is a registered guest. |
boolean |
equals(java.lang.Object object)
Two virtual instancess are considered equal when they share the same UUID. |
Server |
getGuestSystem()
When the virtual instance is registered, this method returns a Server corresponding to the guest that this virtual instance represents. |
Server |
getHostSystem()
Returns a guest's parent or host system. |
java.lang.Long |
getId()
Return the database identifier, the primary key. |
java.lang.String |
getName()
Returns the name of the virtual instance. |
java.lang.Integer |
getNumberOfCPUs()
Returns the number of CPUs allocated to the virtual instance. |
VirtualInstanceState |
getState()
Returns the state of the virtual instance. |
java.lang.Long |
getTotalMemory()
Returns the total memory in KB allocated to the virtual instance. |
VirtualInstanceType |
getType()
Returns the virtualization type for this instance. |
java.lang.String |
getUuid()
Return the system's UUID. |
int |
hashCode()
|
boolean |
isConfirmed()
|
boolean |
isRegisteredGuest()
Returns true if this virtual instance represents a
registered guest. |
void |
setConfirmed(boolean isConfirmed)
|
void |
setGuestSystem(Server system)
Sets the Server corresponding to the guest represented by this virtual instance. |
void |
setHostSystem(Server system)
Sets the parent/host for this guest. |
void |
setName(java.lang.String name)
Set the name of the virtual instance. |
void |
setNumberOfCPUs(java.lang.Integer number)
Sets the number of CPUs allocated to the virtual instance. |
void |
setState(VirtualInstanceState state)
Sets the state of the virtual instance. |
void |
setTotalMemory(java.lang.Long memory)
Sets the total memory in KB allocated to the virtual instance. |
void |
setType(VirtualInstanceType type)
Sets the virtualization type for this instance. |
void |
setUuid(java.lang.String newUuid)
|
java.lang.String |
toString()
|
| 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, wait, wait, wait |
| Constructor Detail |
|---|
public VirtualInstance()
protected VirtualInstance(java.lang.Long instanceId)
instanceId - The unique id to assign to the guest| Method Detail |
|---|
public java.lang.Long getId()
public java.lang.String getUuid()
public void setUuid(java.lang.String newUuid)
newUuid - The new UUIDpublic boolean isConfirmed()
public void setConfirmed(boolean isConfirmed)
isConfirmed - true or falsepublic Server getGuestSystem()
null is returnedpublic void setGuestSystem(Server system)
system - the guest systempublic void deleteGuestSystem()
public Server getHostSystem()
public void setHostSystem(Server system)
system - The host systempublic boolean isRegisteredGuest()
true if this virtual instance represents a
registered guest.
true if this virtual instance represents a
registered guest, false otherwise.public java.lang.String getName()
public void setName(java.lang.String name)
name - The new namepublic java.lang.Long getTotalMemory()
public void setTotalMemory(java.lang.Long memory)
memory - The total memory in KBpublic java.lang.Integer getNumberOfCPUs()
public void setNumberOfCPUs(java.lang.Integer number)
number - The number of CPUspublic VirtualInstanceType getType()
public void setType(VirtualInstanceType type)
type - The new virtualization typepublic VirtualInstanceState getState()
public void setState(VirtualInstanceState state)
state - The new statepublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - The object to test against
true if object is a VirtualInstance
and has the same uuid as this VirtualInstance, false
otherwise.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic GuestAndNonVirtHostView asGuestAndNonVirtHostView()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||