org.jclouds.slicehost.domain
Class Slice

java.lang.Object
  extended by org.jclouds.slicehost.domain.Slice

public class Slice
extends Object

A slice is a virtual machine instance in the Slicehost system. Flavor and image are requisite elements when creating a slice.

Author:
Adrian Cole

Nested Class Summary
static class Slice.Status
          The current status of the slice
 
Constructor Summary
Slice(int id, String name, int flavorId, Integer imageId, Integer backupId, Slice.Status status, Integer progress, float bandwidthIn, float bandwidthOut, Set<String> addresses, String rootPassword)
           
 
Method Summary
 boolean equals(Object obj)
           
 Set<String> getAddresses()
           
 Integer getBackupId()
           
 float getBandwidthIn()
           
 float getBandwidthOut()
           
 int getFlavorId()
           
 int getId()
           
 Integer getImageId()
           
 String getName()
           
 Integer getProgress()
           
 String getRootPassword()
           
 Slice.Status getStatus()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Slice

public Slice(int id,
             String name,
             int flavorId,
             @Nullable
             Integer imageId,
             @Nullable
             Integer backupId,
             Slice.Status status,
             @Nullable
             Integer progress,
             float bandwidthIn,
             float bandwidthOut,
             Set<String> addresses,
             @Nullable
             String rootPassword)
Method Detail

getId

public int getId()
Returns:
unique id within slicehost

getName

public String getName()
Returns:
A string to identify the slice

getFlavorId

public int getFlavorId()
Returns:
the flavor of a slice

getImageId

public Integer getImageId()
Returns:
the image used to create the slice or null

getStatus

public Slice.Status getStatus()
Returns:
The current status of the slice

getProgress

public Integer getProgress()
Returns:
The percentage of current action in percentage

getBandwidthIn

public float getBandwidthIn()
Returns:
The incoming bandwidth total for this billing cycle, in Gigabytes

getBandwidthOut

public float getBandwidthOut()
Returns:
The outgoing bandwidth total for this billing cycle, in Gigabytes

getAddresses

public Set<String> getAddresses()
Returns:
an array of strings representing the Slice's IPs, including private IPs

getRootPassword

public String getRootPassword()
Returns:
root password, if just created

getBackupId

public Integer getBackupId()
Returns:
backup used to create this instance or null

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2012 jclouds. All Rights Reserved.