org.gcube.accounting.datamodel
Class VMUsageRecord

java.lang.Object
  extended by org.gcube.accounting.datamodel.AbstractDelegateUsageRecord
      extended by org.gcube.accounting.datamodel.VMUsageRecord
All Implemented Interfaces:
UsageRecord

public class VMUsageRecord
extends AbstractDelegateUsageRecord


Field Summary
static String TYPE_VM
           
 
Fields inherited from class org.gcube.accounting.datamodel.AbstractDelegateUsageRecord
ur
 
Constructor Summary
VMUsageRecord()
           
VMUsageRecord(UsageRecord ur)
           
 
Method Summary
 Integer getCores()
          Return the number of cores allocated to the Virtual Machine
 String getRefHost()
          Return a reference to the machine hosting the virtual machine
 String getRefVM()
          Return the id of the Virtual Machine
 Calendar getUsageEnd()
          Return the date when the machine usage ended
 Calendar getUsageStart()
          Return the date when the machine usage started
 void setCores(Integer cores)
          Set the number of cores allocated to the Virtual Machine
 void setRefHost(String refHost)
          Set a reference to the machine hosting the virtual machine
 void setRefVM(String refVM)
          Set the id of the virtual machine
 void setStartTime(Calendar startTime)
          Set the left end of the time interval covered by this usage record
 void setUsageEnd(Calendar usageEnd)
          Set the date when the machine usage ended
 void setUsageStart(Calendar usageStart)
          Set the date when the machine usage started
 void validate()
           
 
Methods inherited from class org.gcube.accounting.datamodel.AbstractDelegateUsageRecord
getAggregatedId, getConsumerId, getCreateTime, getCreatorId, getCustomProperties, getCustomProperty, getDelegateUR, getEndTime, getFullyQualifiedConsumerId, getId, getModifyTime, getResourceOwner, getResourceSpecificProperties, getResourceSpecificProperty, getResourceType, getStartTime, setAggregatedId, setConsumerId, setCreateTime, setCreatorId, setCustomProperties, setCustomProperty, setEndTime, setFullyQualifiedConsumerId, setId, setModifyTime, setResourceOwner, setResourceSpecificProperties, setResourceSpecificProperty, setResourceType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_VM

public static final String TYPE_VM
See Also:
Constant Field Values
Constructor Detail

VMUsageRecord

public VMUsageRecord(UsageRecord ur)

VMUsageRecord

public VMUsageRecord()
Method Detail

getRefVM

public String getRefVM()
Return the id of the Virtual Machine

Returns:

setRefVM

public void setRefVM(String refVM)
Set the id of the virtual machine


getCores

public Integer getCores()
Return the number of cores allocated to the Virtual Machine

Returns:

setCores

public void setCores(Integer cores)
              throws InvalidValueException
Set the number of cores allocated to the Virtual Machine

Throws:
InvalidValueException

getRefHost

public String getRefHost()
Return a reference to the machine hosting the virtual machine

Returns:

setRefHost

public void setRefHost(String refHost)
Set a reference to the machine hosting the virtual machine

Parameters:
refHost -

getUsageStart

public Calendar getUsageStart()
Return the date when the machine usage started

Returns:

getUsageEnd

public Calendar getUsageEnd()
Return the date when the machine usage ended

Returns:

setUsageStart

public void setUsageStart(Calendar usageStart)
                   throws InvalidValueException
Set the date when the machine usage started

Parameters:
usageStart -
Throws:
InvalidValueException

setUsageEnd

public void setUsageEnd(Calendar usageEnd)
                 throws InvalidValueException
Set the date when the machine usage ended

Parameters:
usageEnd -
Throws:
InvalidValueException

setStartTime

public void setStartTime(Calendar startTime)
                  throws InvalidValueException
Description copied from interface: UsageRecord
Set the left end of the time interval covered by this usage record

Specified by:
setStartTime in interface UsageRecord
Overrides:
setStartTime in class AbstractDelegateUsageRecord
Throws:
InvalidValueException

validate

public void validate()
              throws InvalidValueException
Specified by:
validate in interface UsageRecord
Overrides:
validate in class AbstractDelegateUsageRecord
Throws:
InvalidValueException


Copyright © 2013. All Rights Reserved.