public class Compute extends Resource
Modifier and Type | Field and Description |
---|---|
static String |
ARCHITECTURE_ATTRIBUTE_NAME |
static String |
CORES_ATTRIBUTE_NAME |
static String |
HOSTNAME_ATTRIBUTE_NAME |
static String |
KIND_IDENTIFIER_DEFAULT |
static String |
MEMORY_ATTRIBUTE_NAME |
static URI |
SCHEME_DEFAULT |
static String |
SPEED_ATTRIBUTE_NAME |
static String |
STATE_ATTRIBUTE_NAME |
static String |
TERM_DEFAULT |
SUMMARY_ATTRIBUTE_NAME
ID_ATTRIBUTE_NAME, TITLE_ATTRIBUTE_NAME
Constructor and Description |
---|
Compute(String id,
Kind kind)
Constructor.
|
Compute(String id,
Kind kind,
String title,
Model model,
String summary)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getArchitecture()
Returns compute's architecture (attribute occi.compute.architecture).
|
String |
getCores()
Returns number of compute's cores (attribute occi.compute.cores).
|
static List<Attribute> |
getDefaultAttributes()
Returns compute's default attributes.
|
static Kind |
getDefaultKind()
Returns compute's default kind instance.
|
String |
getDefaultKindIdentifier()
Returns compute's default identifier
'http://schemas.ogf.org/occi/infrastructure#compute'
|
String |
getHostname()
Returns compute's hostname (attribute occi.compute.hostname).
|
String |
getMemory()
Returns compute's memory (attribute occi.compute.memory).
|
String |
getSpeed()
Returns compute's speed (attribute occi.compute.speed).
|
String |
getState()
Returns compute's state (attribute occi.compute.state).
|
void |
setArchitecture(Architecture architecture)
Sets compute's architecture
|
void |
setArchitecture(String architectureName)
Sets compute's architecture
|
void |
setCores(int cores)
Sets number of compute's cores.
|
void |
setCores(String cores)
Sets number of compute's cores.
|
void |
setHostname(String hostname)
Sets compute's hostname.
|
void |
setMemory(float memory)
Sets compute's memory.
|
void |
setMemory(String memory)
Sets compute's memory.
|
void |
setSpeed(float speed)
Sets compute's speed.
|
void |
setSpeed(String speed)
Sets compute's speed.
|
void |
setState(ComputeState state)
Sets compute's state.
|
void |
setState(String stateName)
Sets compute's state.
|
addAction, addActions, addLink, addLinks, clearActions, clearLinks, containsAction, containsAction, containsLink, containsLink, containsLink, getAction, getActions, getLinks, getLinks, getLinks, getLocation, getSummary, removeAction, removeLink, setSummary, toHeaders, toJSON, toString, toText
addAttribute, addAttributes, addMixin, addMixins, attributesToHeaders, attributesToOneLineText, attributesToPrefixText, clearAttributes, clearMixins, compareTo, containsAttribute, containsAttribute, containsMixin, containsMixin, equals, getAttributes, getId, getIdentifier, getKind, getMixin, getMixins, getModel, getTitle, getValue, getValue, hashCode, removeAttribute, removeMixin, setId, setKind, setModel, setTitle
public static final String ARCHITECTURE_ATTRIBUTE_NAME
public static final String CORES_ATTRIBUTE_NAME
public static final String HOSTNAME_ATTRIBUTE_NAME
public static final String SPEED_ATTRIBUTE_NAME
public static final String MEMORY_ATTRIBUTE_NAME
public static final String STATE_ATTRIBUTE_NAME
public static final URI SCHEME_DEFAULT
public static final String TERM_DEFAULT
public static final String KIND_IDENTIFIER_DEFAULT
public Compute(String id, Kind kind, String title, Model model, String summary) throws InvalidAttributeValueException
id
- occi.core.id attribute. Cannot be null.kind
- compute's kind. Cannot be null.title
- occi.core.title attributemodel
- compute's modelsummary
- compute's summaryInvalidAttributeValueException
- in case of invalid id, title or
summary valuepublic Compute(String id, Kind kind) throws InvalidAttributeValueException
id
- occi.core.id attribute. Cannot be null.kind
- compute's kind. Cannot be null.InvalidAttributeValueException
- in case of invalid id valuepublic String getState()
public void setState(ComputeState state) throws InvalidAttributeValueException
state
- compute's state. Cannot be null.InvalidAttributeValueException
- in case state's value is invalidpublic void setState(String stateName) throws InvalidAttributeValueException
stateName
- compute's state. Cannot be null.InvalidAttributeValueException
- in case state's value is invalidpublic String getMemory()
public void setMemory(float memory) throws InvalidAttributeValueException
memory
- compute's memoryInvalidAttributeValueException
- in case value of memory is invalidpublic void setMemory(String memory) throws InvalidAttributeValueException
memory
- compute's memoryInvalidAttributeValueException
- in case value of memory is invalidpublic String getSpeed()
public void setSpeed(float speed) throws InvalidAttributeValueException
speed
- compute's speedInvalidAttributeValueException
- in case value of speed is invalidpublic void setSpeed(String speed) throws InvalidAttributeValueException
speed
- compute's speedInvalidAttributeValueException
- in case value of speed is invalidpublic String getHostname()
public void setHostname(String hostname) throws InvalidAttributeValueException
hostname
- compute's hostnameInvalidAttributeValueException
- in case value of hostname is
invalidpublic String getCores()
public void setCores(int cores) throws InvalidAttributeValueException
cores
- number of compute's coresInvalidAttributeValueException
- in case value of cores is invalidpublic void setCores(String cores) throws InvalidAttributeValueException
cores
- number of compute's coresInvalidAttributeValueException
- in case value of cores is invalidpublic String getArchitecture()
public void setArchitecture(Architecture architecture) throws InvalidAttributeValueException
architecture
- compute's architecture. Cannot be null.InvalidAttributeValueException
- in case value of architecture is
invalidpublic void setArchitecture(String architectureName) throws InvalidAttributeValueException
architectureName
- compute's architectureInvalidAttributeValueException
- in case value of architecture is
invalidpublic String getDefaultKindIdentifier()
getDefaultKindIdentifier
in class Resource
public static List<Attribute> getDefaultAttributes()
public static Kind getDefaultKind()
Copyright © 2016. All Rights Reserved.