Package org.ivoa.dm.execution
Class TransferPerformance
java.lang.Object
org.ivoa.dm.execution.TransferPerformance
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="execution:TransferPerformance",
role=objectType)
public class TransferPerformance
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Performance of data transfer to/from a node.
objectType: TransferPerformance
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for TransferPerformance, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Longinserted database keyprotected Doublethe error rate of the data transfer as a percentage.protected PhysicalLocationReferenceObject fromLocation : the source location of the data transfer.protected Doublethe latency of the data transfer in seconds.protected Doublethe throughput of the data transfer in bytes/second.protected Datethe timestamp of the performance measurement. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TransferPerformanceTransferPerformance(PhysicalLocation fromLocation, Double throughput, Double latency, Double errorRate, Date timestamp) full parameter constructor.Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic TransferPerformancecreate a TransferPerformance in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns errorRate Attribute.Returns fromLocation ReferencegetId()Returns latency Attribute.Returns throughput Attribute.Returns timestamp Attribute.voidsetErrorRate(Double pErrorRate) Set errorRate Attribute.voidsetFromLocation(PhysicalLocation pFromLocation) Defines fromLocation ReferencevoidsetLatency(Double pLatency) Set latency Attribute.voidsetThroughput(Double pThroughput) Set throughput Attribute.voidsetTimestamp(Date pTimestamp) Set timestamp Attribute.voidupdateUsing(TransferPerformance other) Update this object with the content of the given object.withErrorRate(Double pErrorRate) fluent setter for errorRate Attribute.withLatency(Double pLatency) fluent setter for latency Attribute.withThroughput(Double pThroughput) fluent setter for throughput Attribute.withTimestamp(Date pTimestamp) fluent setter for timestamp Attribute.
-
Field Details
-
_id
inserted database key -
fromLocation
@VoDml(id="execution:TransferPerformance.fromLocation", role=reference, type="execution:PhysicalLocation", typeRole=objectType) protected PhysicalLocation fromLocationReferenceObject fromLocation : the source location of the data transfer. ( Multiplicity : 1 ) -
throughput
@VoDml(id="execution:TransferPerformance.throughput", role=attribute, type="ivoa:real", typeRole=primitiveType) protected Double throughputthe throughput of the data transfer in bytes/second. : Attribute throughput type ivoa:real : multiplicity 1 -
latency
@VoDml(id="execution:TransferPerformance.latency", role=attribute, type="ivoa:real", typeRole=primitiveType) protected Double latencythe latency of the data transfer in seconds. : Attribute latency type ivoa:real : multiplicity 0..1 -
errorRate
@VoDml(id="execution:TransferPerformance.errorRate", role=attribute, type="ivoa:real", typeRole=primitiveType) protected Double errorRatethe error rate of the data transfer as a percentage. : Attribute errorRate type ivoa:real : multiplicity 0..1 -
timestamp
@VoDml(id="execution:TransferPerformance.timestamp", role=attribute, type="ivoa:datetime", typeRole=primitiveType) protected Date timestampthe timestamp of the performance measurement. : Attribute timestamp type ivoa:datetime : multiplicity 1
-
-
Constructor Details
-
TransferPerformance
public TransferPerformance()Creates a new TransferPerformance -
TransferPerformance
public TransferPerformance(PhysicalLocation fromLocation, Double throughput, Double latency, Double errorRate, Date timestamp) full parameter constructor.- Parameters:
fromLocation- the source location of the data transfer.throughput- the throughput of the data transfer in bytes/second.latency- the latency of the data transfer in seconds.errorRate- the error rate of the data transfer as a percentage.timestamp- the timestamp of the performance measurement.
-
TransferPerformance
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>- Returns:
- the id
-
updateUsing
Update this object with the content of the given object. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
getFromLocation
Returns fromLocation Reference- Returns:
- fromLocation Reference
-
setFromLocation
Defines fromLocation Reference- Parameters:
pFromLocation- reference to set
-
getThroughput
Returns throughput Attribute.- Returns:
- throughput Attribute
-
setThroughput
Set throughput Attribute.- Parameters:
pThroughput- value to set
-
withThroughput
fluent setter for throughput Attribute.- Parameters:
pThroughput- value to set- Returns:
- TransferPerformance
-
getLatency
Returns latency Attribute.- Returns:
- latency Attribute
-
setLatency
Set latency Attribute.- Parameters:
pLatency- value to set
-
withLatency
fluent setter for latency Attribute.- Parameters:
pLatency- value to set- Returns:
- TransferPerformance
-
getErrorRate
Returns errorRate Attribute.- Returns:
- errorRate Attribute
-
setErrorRate
Set errorRate Attribute.- Parameters:
pErrorRate- value to set
-
withErrorRate
fluent setter for errorRate Attribute.- Parameters:
pErrorRate- value to set- Returns:
- TransferPerformance
-
getTimestamp
Returns timestamp Attribute.- Returns:
- timestamp Attribute
-
setTimestamp
Set timestamp Attribute.- Parameters:
pTimestamp- value to set
-
withTimestamp
fluent setter for timestamp Attribute.- Parameters:
pTimestamp- value to set- Returns:
- TransferPerformance
-
createTransferPerformance
public static TransferPerformance createTransferPerformance(Consumer<TransferPerformance.TransferPerformanceBuilder> f) create a TransferPerformance in functional builder style.- Parameters:
f- the functional builder.- Returns:
- an object initialized from the builder.
-
forceLoad
public void forceLoad()- Specified by:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-