org.dasein.cloud.services.dc
Class DataCenter

java.lang.Object
  extended by org.dasein.cloud.services.dc.DataCenter
All Implemented Interfaces:
Serializable

public class DataCenter
extends Object
implements Serializable

A data center represents a group of virtualized resources that share a significant amount of common physical infrastructure.

Author:
George Reese @ enStratus (http://www.enstratus.com)
See Also:
Serialized Form

Constructor Summary
DataCenter()
          Constructs an empty data center object, only useful in marshalling and unmarshalling.
DataCenter(String dataCenterId, String name, String regionId, boolean active, boolean available)
          Constructs a new data center object from the specified state values.
 
Method Summary
 boolean equals(Object ob)
           
 String getName()
          A (hopefully) user-friendly name for the data center as known by the provider.
 String getProviderDataCenterId()
          The unique ID as understood by the provider for representing this data center.
 String getRegionId()
           
 boolean isActive()
          A data center is considered to be active if it should be available.
 boolean isAvailable()
          A data center is considered available if a customer can allocate resources in that data center.
 void setActive(boolean active)
          Used only for marshalling and not to be used programatically.
 void setAvailable(boolean available)
          Used only for marshalling and not to be used programmatically.
 void setName(String name)
          Used only for marshalling and not to be used programmatically.
 void setProviderDataCenterId(String id)
          Used only for marshalling and not to be used programmatically.
 void setRegionId(String regionId)
          Used only for marshalling and not to be used programmatically.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataCenter

public DataCenter()
Constructs an empty data center object, only useful in marshalling and unmarshalling.


DataCenter

public DataCenter(String dataCenterId,
                  String name,
                  String regionId,
                  boolean active,
                  boolean available)
Constructs a new data center object from the specified state values.

Parameters:
dataCenterId - the provider identifier for the data center
name - the name of the data center
active - whether or not the data center is currently in use with the provider
available - whether or not the data center is currently up and operating normally
Method Detail

equals

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

getName

public String getName()
A (hopefully) user-friendly name for the data center as known by the provider. If the provider does not support meta-data, this value should be the same as the data center ID.

Returns:
the user-friendly name for the data center

getProviderDataCenterId

public String getProviderDataCenterId()
The unique ID as understood by the provider for representing this data center.

Returns:
the provider's unique identifier for this data center

getRegionId

public String getRegionId()
Returns:
the provider's unique ID for the region in which this data center is located

isActive

public boolean isActive()
A data center is considered to be active if it should be available. In other words, this value will be false only for discontinued data centers or for new data centers not quite released for production.

Returns:
true if this data center should be operational

isAvailable

public boolean isAvailable()
A data center is considered available if a customer can allocate resources in that data center. A data center can be unavailable and active, but it cannot be inactive and available.

Returns:
true if the customer should be able to expect successful resource allocation in the data center

setActive

public void setActive(boolean active)
Used only for marshalling and not to be used programatically.

Parameters:
active - whether or not the marshalled data center is active

setAvailable

public void setAvailable(boolean available)
Used only for marshalling and not to be used programmatically.

Parameters:
available - whether or not the marshalled data center is available

setName

public void setName(String name)
Used only for marshalling and not to be used programmatically.

Parameters:
name - the name of the marshalled data center

setProviderDataCenterId

public void setProviderDataCenterId(String id)
Used only for marshalling and not to be used programmatically.

Parameters:
id - the unique ID of the marshalled data center

setRegionId

public void setRegionId(String regionId)
Used only for marshalling and not to be used programmatically.

Parameters:
regionId - the unique ID of the region in which the marshalled data center is located