public class JobUsageRecord extends UsageRecordType
JAXB bean for a a Usage Record as described by Open Grid Forum's
specification GFD.98
serialized in the namespace http://schema.ogf.org/urf/2003/09/urf
This class represents the outer <UsageRecord>
element
which can be serialized with marshal()
and deserialized with
unmarshal(String)
). This class also provides convenience methods to
set the usage record properties like setJobName(String)
,
addUser(String, String)
or addProcessors(int)
.
The underlying JAXB elements and types of the usage records are covered by
the package org.apache.taverna.server.usagerecord.xml.urf
, see its
ObjectFactory
for more.
This class should not be confused with the plain JAXB bean
JobUsageRecord
.
charge, diskOrMemoryOrSwap, jobIdentity, jobName, recordIdentity, status, userIdentity, wallDurationOrCpuDurationOrNodeCount
Constructor and Description |
---|
JobUsageRecord()
Create a new usage record with a random UUID as its identity.
|
JobUsageRecord(String name)
Create a new usage record with the given name and a random UUID as its identity.
|
getCharge, getDiskOrMemoryOrSwap, getJobIdentity, getJobName, getRecordIdentity, getStatus, getUserIdentity, getWallDurationOrCpuDurationOrNodeCount, setCharge, setJobIdentity, setJobName, setRecordIdentity, setStatus
public JobUsageRecord() throws DatatypeConfigurationException
DatatypeConfigurationException
- If the factory for XML-relevant datatypes fails to build; not
expected.public JobUsageRecord(String name) throws DatatypeConfigurationException
name
- The name of the job to which this record pertains.DatatypeConfigurationException
- If the factory for XML-relevant datatypes fails to build; not
expected.public static JobUsageRecord unmarshal(String s) throws JAXBException
JAXBException
public static JobUsageRecord unmarshal(Element elem) throws JAXBException
JAXBException
public WallDuration addWallDuration(long millis)
public CpuDuration addCpuDuration(long millis)
public NodeCount addNodeCount(int nodes)
public Processors addProcessors(int processors)
public SubmitHost addSubmitHost(String host)
public MachineName addMachine(String host)
public ProjectName addProject(String project)
public void addResource(ConsumableResourceType consumable)
public ResourceType addResource(ResourceType resource)
public ResourceType addResource(String description, String value)
public ServiceLevel addServiceLevel(String service)
public Memory addMemory(long memory)
public TimeInstant addTimestamp(Date timestamp, String type)
public TimeDuration addDuration(long millis, String type)
public Network addNetwork(long value)
public Disk addDisk(long value)
public Swap addSwap(long value)
public UserIdentity addUser(String localUID, String globalName)
public Charge addCharge(float value)
public <T> T getOfType(Class<T> clazz)
public String marshal() throws JAXBException
JAXBException
Copyright © 2015–2018 The Apache Software Foundation. All rights reserved.