org.gcube.accounting.datamodel
Class JobUsageRecord

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

public class JobUsageRecord
extends AbstractDelegateUsageRecord


Field Summary
static String TYPE_JOB
           
 
Fields inherited from class org.gcube.accounting.datamodel.AbstractDelegateUsageRecord
ur
 
Constructor Summary
JobUsageRecord()
           
JobUsageRecord(UsageRecord ur)
           
 
Method Summary
 Integer getCores()
           
 Long getCpuDuration()
          in millis
 Long getDisk()
          in bytes
 Long getInputFilesNumber()
           
 Long getInputFilesSize()
           
 Calendar getJobEnd()
          Return the date when the job ended
 String getJobId()
           
 String getJobName()
           
 Calendar getJobStart()
          Return the date when the job started
 String getJobStatus()
           
 Long getMemory()
          in bytes
 Long getOutputFilesNumber()
           
 Long getOutputFilesSize()
           
 Long getOverallNetworkIn()
          Return the overall amount of bytes sent in the VM lifetime
 Long getOverallNetworkOut()
          Return the overall amount of bytes sent in the VM lifetime
 Integer getProcessors()
           
 String getRefVM()
          Return the id of the Virtual Machine
 Long getWallDuration()
          in millis
 void setCores(Integer cores)
           
 void setCpuDuration(Long duration)
          in millis
 void setDisk(Long diskUsed)
          in bytes
 void setInputFilesNumber(Long n)
           
 void setInputFilesSize(Long s)
           
 void setJobEnd(Calendar jobEnd)
          Set the date when the job ended
 void setJobId(String jobId)
           
 void setJobName(String name)
           
 void setJobStart(Calendar jobStart)
          Set the date when the job started
 void setJobStatus(String jobStatus)
           
 void setMemory(Long memory)
          in bytes
 void setOutputFilesNumber(Long n)
           
 void setOutputFilesSize(Long s)
           
 void setOverallNetworkIn(Long netIn)
          Set the overall amount of bytes sent in the VM lifetime
 void setOverallNetworkOut(Long netOut)
          Set the overall amount of bytes sent in the VM lifetime
 void setProcessors(Integer processors)
           
 void setRefVM(String refVM)
          Set the id of the virtual machine
 void setWallDuration(Long duration)
          in millis
 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, setStartTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_JOB

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

JobUsageRecord

public JobUsageRecord(UsageRecord ur)

JobUsageRecord

public JobUsageRecord()
Method Detail

getJobId

public String getJobId()

setJobId

public void setJobId(String jobId)

getJobStatus

public String getJobStatus()

setJobStatus

public void setJobStatus(String jobStatus)

getWallDuration

public Long getWallDuration()
in millis

Returns:

setWallDuration

public void setWallDuration(Long duration)
                     throws InvalidValueException
in millis

Parameters:
duration -
Throws:
InvalidValueException

getCpuDuration

public Long getCpuDuration()
in millis

Returns:

setCpuDuration

public void setCpuDuration(Long duration)
                    throws InvalidValueException
in millis

Parameters:
duration -
Throws:
InvalidValueException

setOverallNetworkIn

public void setOverallNetworkIn(Long netIn)
                         throws InvalidValueException
Set the overall amount of bytes sent in the VM lifetime

Throws:
InvalidValueException

getOverallNetworkIn

public Long getOverallNetworkIn()
Return the overall amount of bytes sent in the VM lifetime

Returns:

setOverallNetworkOut

public void setOverallNetworkOut(Long netOut)
                          throws InvalidValueException
Set the overall amount of bytes sent in the VM lifetime

Throws:
InvalidValueException

getOverallNetworkOut

public Long getOverallNetworkOut()
Return the overall amount of bytes sent in the VM lifetime

Returns:

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


getDisk

public Long getDisk()
in bytes

Returns:

setDisk

public void setDisk(Long diskUsed)
             throws InvalidValueException
in bytes

Parameters:
duration -
Throws:
InvalidValueException

getJobName

public String getJobName()

setJobName

public void setJobName(String name)

getMemory

public Long getMemory()
in bytes

Returns:

setMemory

public void setMemory(Long memory)
               throws InvalidValueException
in bytes

Parameters:
duration -
Throws:
InvalidValueException

getJobStart

public Calendar getJobStart()
Return the date when the job started

Returns:

getJobEnd

public Calendar getJobEnd()
Return the date when the job ended

Returns:

setJobStart

public void setJobStart(Calendar jobStart)
                 throws InvalidValueException
Set the date when the job started

Parameters:
usageStart -
Throws:
InvalidValueException

setJobEnd

public void setJobEnd(Calendar jobEnd)
               throws InvalidValueException
Set the date when the job ended

Parameters:
usageEnd -
Throws:
InvalidValueException

getProcessors

public Integer getProcessors()

setProcessors

public void setProcessors(Integer processors)
                   throws InvalidValueException
Throws:
InvalidValueException

getCores

public Integer getCores()

setCores

public void setCores(Integer cores)
              throws InvalidValueException
Throws:
InvalidValueException

getInputFilesNumber

public Long getInputFilesNumber()

setInputFilesNumber

public void setInputFilesNumber(Long n)
                         throws InvalidValueException
Throws:
InvalidValueException

getInputFilesSize

public Long getInputFilesSize()

setInputFilesSize

public void setInputFilesSize(Long s)
                       throws InvalidValueException
Throws:
InvalidValueException

getOutputFilesNumber

public Long getOutputFilesNumber()

setOutputFilesNumber

public void setOutputFilesNumber(Long n)
                          throws InvalidValueException
Throws:
InvalidValueException

getOutputFilesSize

public Long getOutputFilesSize()

setOutputFilesSize

public void setOutputFilesSize(Long s)
                        throws InvalidValueException
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.